Re: New Table Access Methods for Multi and Single Inserts

2024-03-01 Thread Bharath Rupireddy
On Mon, Jan 29, 2024 at 5:16 PM Bharath Rupireddy wrote: > > > Please find the attached v9 patch set. I've had to rebase the patches due to commit 874d817, please find the attached v11 patch set. -- Bharath Rupireddy PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services:

Re: pread, pwrite, etc return ssize_t not int

2024-03-01 Thread Peter Eisentraut
On 01.03.24 22:23, Thomas Munro wrote: For the overflow of the input length (size_t -> DWORD), I don't think we actually need to do anything. The size argument would be truncated, but the callers would just repeat the calls with the remaining size, so in effect they will read the data in chunks

RE: Synchronizing slots from primary to standby

2024-03-01 Thread Zhijie Hou (Fujitsu)
On Thursday, February 29, 2024 11:16 AM Zhijie Hou (Fujitsu) wrote: > > On Wednesday, February 28, 2024 7:36 PM Bertrand Drouvot > wrote: > > > > 4 === > > > > Regarding the test, what about adding one to test the "new" behavior > > discussed up-thread? (logical replication will wait if slot

RE: Synchronizing slots from primary to standby

2024-03-01 Thread Zhijie Hou (Fujitsu)
On Friday, March 1, 2024 12:23 PM Peter Smith wrote: > > Here are some review comments for v102-0001. > > == > doc/src/sgml/config.sgml > > 1. > + > +Lists the streaming replication standby server slot names that > logical > +WAL sender processes will wait for.

Re: Avoiding inadvertent debugging mode for pgbench

2024-03-01 Thread Euler Taveira
On Fri, Mar 1, 2024, at 8:07 PM, Tomas Vondra wrote: > On 3/1/24 23:41, Nathan Bossart wrote: > > > > I think this is a generally reasonable proposal, except I don't know > > whether this breakage is acceptable. AFAICT there are two fundamental > > behavior changes folks would observe: > > > >

Re: Showing applied extended statistics in explain Part 2

2024-03-01 Thread Tomas Vondra
On 3/1/24 01:19, Tatsuro Yamada wrote: > Hi, > > This original patch made by Tomas improves the usability of extended > statistics, > so I rebased it on 362de947, and I'd like to re-start developing it. > > The previous thread [1] suggested something to solve. I'll try to solve it as > best

Re: Avoiding inadvertent debugging mode for pgbench

2024-03-01 Thread Tomas Vondra
On 3/1/24 23:41, Nathan Bossart wrote: > On Thu, Feb 29, 2024 at 07:05:13PM -0500, Greg Sabino Mullane wrote: >> Attached please find a patch to adjust the behavior of the pgbench program >> and make it behave like the other programs that connect to a database >> (namely, psql and pg_dump).

Re: Parallel Bitmap Heap Scan reports per-worker stats in EXPLAIN ANALYZE

2024-03-01 Thread Melanie Plageman
On Sat, Feb 17, 2024 at 5:31 PM Tomas Vondra wrote: > > Hi David, > > Do you plan to work continue working on this patch? I did take a look, > and on the whole it looks reasonable - it modifies the right places etc. I haven't started reviewing this patch yet, but I just ran into the behavior

Re: Avoiding inadvertent debugging mode for pgbench

2024-03-01 Thread Nathan Bossart
On Thu, Feb 29, 2024 at 07:05:13PM -0500, Greg Sabino Mullane wrote: > Attached please find a patch to adjust the behavior of the pgbench program > and make it behave like the other programs that connect to a database > (namely, psql and pg_dump). Specifically, add support for using -d and >

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

2024-03-01 Thread Nathan Bossart
On Wed, Feb 21, 2024 at 08:10:00PM +0530, Bharath Rupireddy wrote: > I'm thinking the other way around - how about we revert > https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=007693f2a3ac2ac19affcb03ad43cdb36ccff5b5, > that is, put in place "conflict" as a boolean and introduce

Re: Experiments with Postgres and SSL

2024-03-01 Thread Jacob Champion
On Wed, Feb 28, 2024 at 4:10 AM Heikki Linnakangas wrote: > I think we'd want to *avoid* changing the major protocol version in a > way that would introduce a new roundtrip, though. I'm starting to get up to speed with this patchset. So far I'm mostly testing how it works; I have yet to take an

Re: Popcount optimization using AVX512

2024-03-01 Thread Nathan Bossart
Thanks for the new version of the patch. I didn't see a commitfest entry for this one, and unfortunately I think it's too late to add it for the March commitfest. I would encourage you to add it to July's commitfest [0] so that we can get some routine cfbot coverage. On Tue, Feb 27, 2024 at

Re: pread, pwrite, etc return ssize_t not int

2024-03-01 Thread Thomas Munro
On Sat, Mar 2, 2024 at 3:12 AM Peter Eisentraut wrote: > 0001-Return-ssize_t-in-fd.c-I-O-functions.patch > > This patch looks correct to me. Thanks, I'll push this one. > 0002-Fix-theoretical-overflow-in-Windows-pg_pread-pg_pwri.patch > > I have two comments on that: > > For the overflow of the

Re: ALTER TABLE SET ACCESS METHOD on partitioned tables

2024-03-01 Thread Justin Pryzby
On Fri, Mar 01, 2024 at 10:56:50AM +0900, Michael Paquier wrote: > On Thu, Feb 29, 2024 at 08:51:31AM -0600, Justin Pryzby wrote: > > On Wed, Feb 28, 2024 at 05:08:49PM +0900, Michael Paquier wrote: > >> I have implemented that so as we keep the default, historical > >> behavior: if pg_class.relam

Re: speed up a logical replica setup

2024-03-01 Thread Euler Taveira
On Thu, Feb 22, 2024, at 12:45 PM, Hayato Kuroda (Fujitsu) wrote: > Based on idea from Euler, I roughly implemented. Thought? > > 0001-0013 were not changed from the previous version. > > V24-0014: addressed your comment in the replied e-mail. > V24-0015: Add disconnect_database() again, per [3]

Re: BitmapHeapScan streaming read user and prelim refactoring

2024-03-01 Thread Melanie Plageman
On Thu, Feb 29, 2024 at 7:29 PM Melanie Plageman wrote: > > On Thu, Feb 29, 2024 at 5:44 PM Tomas Vondra > wrote: > > > > > > > > On 2/29/24 22:19, Melanie Plageman wrote: > > > On Thu, Feb 29, 2024 at 7:54 AM Tomas Vondra > > > wrote: > > >> > > >> > > >> > > >> On 2/29/24 00:40, Melanie

Re: [Patch] add multiple client certificate selection feature

2024-03-01 Thread Cary Huang
Hello I would like to share a version 2 patch for multiple client certificate selection feature with several enhancements over v1. I removed the extra parameter "sslcertdir" and "sslkeydir". Instead, I reuse the existing sslcert, ssldir and sslpassword parameters but allow multiple entries to

Re: index prefetching

2024-03-01 Thread Peter Geoghegan
On Fri, Mar 1, 2024 at 10:18 AM Tomas Vondra wrote: > But I have very hard time figuring out what the MVP version should be, > because I have very limited understanding on how much control the index > AM ought to have :-( And it'd be a bit silly to do something in v17, > only to have to rip it

Re: Statistics Import and Export

2024-03-01 Thread Stephen Frost
Greetings, On Fri, Mar 1, 2024 at 12:14 Nathan Bossart wrote: > On Thu, Feb 29, 2024 at 10:55:20PM -0500, Corey Huinker wrote: > >> That’s certainly a fair point and my initial reaction (which could > >> certainly be wrong) is that it’s unlikely to be an issue- but also, if > you > >> feel you

Re: Statistics Import and Export

2024-03-01 Thread Nathan Bossart
On Thu, Feb 29, 2024 at 10:55:20PM -0500, Corey Huinker wrote: >> That’s certainly a fair point and my initial reaction (which could >> certainly be wrong) is that it’s unlikely to be an issue- but also, if you >> feel you could make it work with an array and passing all the attribute >> info in

Re: BitmapHeapScan streaming read user and prelim refactoring

2024-03-01 Thread Tomas Vondra
On 3/1/24 17:51, Melanie Plageman wrote: > On Fri, Mar 1, 2024 at 9:05 AM Tomas Vondra > wrote: >> >> On 3/1/24 02:18, Melanie Plageman wrote: >>> On Thu, Feb 29, 2024 at 6:44 PM Tomas Vondra >>> wrote: On 2/29/24 23:44, Tomas Vondra wrote: 1) On master there's clear difference

Re: BitmapHeapScan streaming read user and prelim refactoring

2024-03-01 Thread Melanie Plageman
On Fri, Mar 1, 2024 at 9:05 AM Tomas Vondra wrote: > > On 3/1/24 02:18, Melanie Plageman wrote: > > On Thu, Feb 29, 2024 at 6:44 PM Tomas Vondra > > wrote: > >> > >> On 2/29/24 23:44, Tomas Vondra wrote: > >> 1) On master there's clear difference between eic=0 and eic=1 cases, but > >> on the

Re: make BuiltinTrancheNames less ugly

2024-03-01 Thread Tristan Partin
On Fri Mar 1, 2024 at 8:00 AM CST, Alvaro Herrera wrote: On 2024-Feb-23, Heikki Linnakangas wrote: > On 12/02/2024 19:01, Tristan Partin wrote: > > On Wed Jan 24, 2024 at 8:09 AM CST, Alvaro Herrera wrote: > > > IMO it would be less ugly to have the origin file lwlocknames.txt be > > > not a

Re: double precisoin type

2024-03-01 Thread Tom Lane
Fabrice Chapuis writes: > Documentation says: > double precision 8 bytes variable-precision, inexact 15 decimal digits > precision The documentation is stating the minimum number of decimal digits that will be accurately reproduced. You got 16 reproduced correctly in this example, but you were

Re: POC, WIP: OR-clause support for indexes

2024-03-01 Thread Alexander Korotkov
Hi, Andrei, Hi, Alena! On Thu, Feb 29, 2024 at 10:59 AM Andrei Lepikhov wrote: > On 28/2/2024 17:27, Alena Rybakina wrote: > > Maybe like that: > > > > It also considers the way to generate a path using BitmapScan indexes, > > converting the transformed expression into expressions separated by

Re: index prefetching

2024-03-01 Thread Tomas Vondra
On 2/15/24 21:30, Peter Geoghegan wrote: > On Thu, Feb 15, 2024 at 3:13 PM Andres Freund wrote: >>> This is why I don't think that the tuples with lower page offset >>> numbers are in any way significant here. The significant part is >>> whether or not you'll actually need to visit more than one

Re: index prefetching

2024-03-01 Thread Tomas Vondra
Hi, Thanks for looking at the patch! On 3/1/24 09:20, Jakub Wartak wrote: > On Wed, Jan 24, 2024 at 7:13 PM Tomas Vondra > wrote: > [ >> >> (1) Melanie actually presented a very different way to implement this, >> relying on the StreamingRead API. So chances are this struct won't >> actually

double precisoin type

2024-03-01 Thread Fabrice Chapuis
Hello, postgres [1264904]=# select 123456789.123456789123456::double precision; ┌┐ │ float8 │ ├┤ │ 123456789.12345679 │ └┘ (1 row) I do not understand why this number is truncated at 123456789.12345679 that is 17 digits and

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

2024-03-01 Thread Bharath Rupireddy
On Thu, Feb 22, 2024 at 1:44 PM Bertrand Drouvot wrote: > > > > Does that make sense to you to use "conflict" as value in > > > "invalidation_reason" > > > when the slot has "conflict_reason" not NULL? > > > > I'm thinking the other way around - how about we revert > >

Re: Make query cancellation keys longer

2024-03-01 Thread Peter Eisentraut
On 29.02.24 22:25, Heikki Linnakangas wrote: Currently, cancel request key is a 32-bit token, which isn't very much entropy. If you want to cancel another session's query, you can brute-force it. In most environments, an unauthorized cancellation of a query isn't very serious, but it

Re: pread, pwrite, etc return ssize_t not int

2024-03-01 Thread Peter Eisentraut
On 27.02.24 12:21, Thomas Munro wrote: Patches attached. PS Correction to my earlier statement about POSIX: the traditional K interfaces were indeed in the original POSIX.1 1988 but it was the 1990 edition (approximately coinciding with standard C) that adopted void, size_t, const and invented

Re: BitmapHeapScan streaming read user and prelim refactoring

2024-03-01 Thread Tomas Vondra
On 3/1/24 02:18, Melanie Plageman wrote: > On Thu, Feb 29, 2024 at 6:44 PM Tomas Vondra > wrote: >> >> On 2/29/24 23:44, Tomas Vondra wrote: >>> >>> ... >>> > > I do have some partial results, comparing the patches. I only ran one of > the more affected workloads (cyclic) on the

Re: make BuiltinTrancheNames less ugly

2024-03-01 Thread Alvaro Herrera
On 2024-Feb-23, Heikki Linnakangas wrote: > On 12/02/2024 19:01, Tristan Partin wrote: > > On Wed Jan 24, 2024 at 8:09 AM CST, Alvaro Herrera wrote: > > > IMO it would be less ugly to have the origin file lwlocknames.txt be > > > not a text file but a .h with a macro that can be defined by > > >

Re: Commitfest Manager for March

2024-03-01 Thread Andrey M. Borodin
> On 1 Mar 2024, at 17:29, Daniel Gustafsson wrote: > > The call for a CFM volunteer is still open. I always wanted to try. And most of the stuff I'm interested in is already committed. But given importance of last commitfest before feature freeze, we might be interested in more

Re: btree: implement dynamic prefix truncation (was: Improving btree performance through specializing by key shape, take 2)

2024-03-01 Thread Matthias van de Meent
On Wed, 24 Jan 2024 at 13:02, Matthias van de Meent wrote: > > 1. > > Commit message refers to a non-existing reference '(see [0])'. > > Noted, I'll update that. > > > 2. > > +When we do a binary search on a sorted set (such as a BTree), we know that > > a > > +tuple will be smaller than its

Re: Commitfest Manager for March

2024-03-01 Thread Daniel Gustafsson
> On 29 Feb 2024, at 22:26, Daniel Gustafsson wrote: > We are now hours away from starting the last commitfest for v17 It is now March 1 in all timezones, so I have switched 202403 to In Progress and 202307 to Open. There are a total of 331 patches registered with 286 of those in an open

Re: src/include/miscadmin.h outdated comments

2024-03-01 Thread Matthias van de Meent
On Fri, 1 Mar 2024 at 12:19, jian he wrote: > > hi. > > /* > * globals.h -- * > > */ > > The above comment src/include/miscadmin.h is not

src/include/miscadmin.h outdated comments

2024-03-01 Thread jian he
hi. /* * globals.h -- * */ The above comment src/include/miscadmin.h is not accurate? we don't have globals.h file?

Re: Regardign RecentFlushPtr in WalSndWaitForWal()

2024-03-01 Thread Matthias van de Meent
On Mon, 26 Feb 2024 at 12:46, shveta malik wrote: > > Hi hackers, > > I would like to understand why we have code [1] that retrieves > RecentFlushPtr in WalSndWaitForWal() outside of the loop. We utilize > RecentFlushPtr later within the loop, but prior to that, we already > have [2]. Wouldn't

Re: Volatile write caches on macOS and Windows, redux

2024-03-01 Thread Thomas Munro
Rebased over 8d140c58. v2-0001-Make-wal_sync_method-fdatasync-the-default-on-all.patch Description: Binary data v2-0002-Remove-fsync_writethrough-add-fsync-full-macOS-on.patch Description: Binary data

Re: Regardign RecentFlushPtr in WalSndWaitForWal()

2024-03-01 Thread Bertrand Drouvot
Hi, On Mon, Feb 26, 2024 at 05:16:39PM +0530, shveta malik wrote: > Hi hackers, > > I would like to understand why we have code [1] that retrieves > RecentFlushPtr in WalSndWaitForWal() outside of the loop. We utilize > RecentFlushPtr later within the loop, but prior to that, we already > have

Missing LWLock protection in pgstat_reset_replslot()

2024-03-01 Thread Bertrand Drouvot
Hi hackers, I think that pgstat_reset_replslot() is missing LWLock protection. Indeed, we don't have any guarantee that the slot is active (then preventing it to be dropped/recreated) when this function is executed. Attached a patch to add the missing protection. Regards, -- Bertrand Drouvot

Re: Improve readability by using designated initializers when possible

2024-03-01 Thread Peter Eisentraut
On 01.03.24 05:08, Michael Paquier wrote: On Thu, Feb 29, 2024 at 12:41:38PM +0100, Peter Eisentraut wrote: On 27.02.24 08:57, Alvaro Herrera wrote: On 2024-Feb-27, Michael Paquier wrote: These would cause compilation failures. Saying that, this is a very nice cleanup, so I've fixed these

Re: Synchronizing slots from primary to standby

2024-03-01 Thread Amit Kapila
On Fri, Mar 1, 2024 at 11:41 AM Masahiko Sawada wrote: > > On Fri, Mar 1, 2024 at 12:42 PM Zhijie Hou (Fujitsu) > wrote: > --- > I was a bit surprised by the fact that standby_slot_names value is > handled in a different way than a similar parameter > synchronous_standby_names. For example, the

Re: Synchronizing slots from primary to standby

2024-03-01 Thread Ajin Cherian
On Thu, Feb 29, 2024 at 12:34 PM Zhijie Hou (Fujitsu) < houzj.f...@fujitsu.com> wrote: > On Monday, February 26, 2024 7:52 PM Amit Kapila > wrote: > > > > On Mon, Feb 26, 2024 at 7:49 AM Zhijie Hou (Fujitsu) < > houzj.f...@fujitsu.com> > > wrote: > > > > > > Attach the V98 patch set which

Re: index prefetching

2024-03-01 Thread Jakub Wartak
On Wed, Jan 24, 2024 at 7:13 PM Tomas Vondra wrote: [ > > (1) Melanie actually presented a very different way to implement this, > relying on the StreamingRead API. So chances are this struct won't > actually be used. Given lots of effort already spent on this and the fact that is thread is

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

2024-03-01 Thread Masahiko Sawada
On Thu, Feb 29, 2024 at 8:43 PM John Naylor wrote: > > On Tue, Feb 20, 2024 at 1:59 PM Masahiko Sawada wrote: > > > - v63-0008 patch fixes a bug in tidstore. > > - page->nwords = wordnum + 1; > - Assert(page->nwords = WORDS_PER_PAGE(offsets[num_offsets - 1])); > + page->nwords = wordnum; > +