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

2023-11-07 Thread Peter Eisentraut
On 06.07.23 00:00, Daniel Gustafsson wrote: On 16 May 2023, at 11:17, Daniel Gustafsson wrote: Parked in the July CF for now. Rebased to fix a trivial conflict highlighted by the CFBot. I think the problem with this approach is that one would need to reapply it to each regression test

Question about the Implementation of vector32_is_highbit_set on ARM

2023-11-07 Thread Xiang Gao
Hi all, I have some questions about the implementation of vector32_is_highbit_set on arm. Below is the comment and the implementation for this function. /* * Exactly like vector8_is_highbit_set except for the input type, so it * looks at each byte separately. * * XXX x86 uses the same

Re: Improve WALRead() to suck data directly from WAL buffers when possible

2023-11-07 Thread Bharath Rupireddy
On Sat, Nov 4, 2023 at 6:13 AM Andres Freund wrote: > > > + cur_lsn = GetFlushRecPtr(NULL); > > + if (unlikely(startptr > cur_lsn)) > > + elog(ERROR, "WAL start LSN %X/%X specified for reading from > > WAL buffers must be less than current database system WAL LSN %X/%X", > >

Re: Show WAL write and fsync stats in pg_stat_io

2023-11-07 Thread Bharath Rupireddy
On Wed, Sep 20, 2023 at 1:28 PM Nazir Bilal Yavuz wrote: > > Hi, > > Thanks for the review! > > Current status of the patch is: > - IOOBJECT_WAL / IOCONTEXT_NORMAL read, write and fsync stats are added. > - IOOBJECT_WAL / IOCONTEXT_NORMAL write and fsync tests are added. > - IOOBJECT_WAL /

Doubled test for SET statements in pg_stat_statements tests

2023-11-07 Thread Sergei Kornilov
Hello! I noticed that the same block -- SET statements. -- These use two different strings, still they count as one entry. SET work_mem = '1MB'; Set work_mem = '1MB'; SET work_mem = '2MB'; RESET work_mem; SET enable_seqscan = off; SET enable_seqscan = on; RESET enable_seqscan; is checked twice

Re: ensure, not insure

2023-11-07 Thread David Rowley
On Wed, 8 Nov 2023 at 19:56, Peter Smith wrote: > gettext_noop("The server will use the fsync() system call in several > places to make " > "sure that updates are physically written to disk. This insures " > "that a database cluster will recover to a consistent state after " > "an operating

Re: Remove unnecessary 'always:' from CompilerWarnings task

2023-11-07 Thread Peter Eisentraut
On 05.09.23 12:25, Nazir Bilal Yavuz wrote: There are multiple 'always:' keywords under the CompilerWarnings task. Instead of that, we can use one 'always:' and move the instructions under this. So, I removed unnecessary ones and rearranged indents according to that change. I'm not sure this

Re: GenBKI emits useless open;close for catalogs without rows

2023-11-07 Thread Peter Eisentraut
On 08.11.23 08:16, Peter Eisentraut wrote: On 19.09.23 20:05, Heikki Linnakangas wrote: One thing caught my eye though: We currently have an "open" command after every "create". Except for bootstrap relations; creating a bootstrap relation opens it implicitly. That seems like a weird

Re: GenBKI emits useless open;close for catalogs without rows

2023-11-07 Thread Peter Eisentraut
On 19.09.23 20:05, Heikki Linnakangas wrote: One thing caught my eye though: We currently have an "open" command after every "create". Except for bootstrap relations; creating a bootstrap relation opens it implicitly. That seems like a weird inconsistency. If we make "create" to always open

Re: Synchronizing slots from primary to standby

2023-11-07 Thread Drouvot, Bertrand
Hi, On 11/8/23 4:50 AM, Amit Kapila wrote: On Tue, Nov 7, 2023 at 7:58 PM Drouvot, Bertrand wrote: If we think this window is too short we could: - increase it or - don't drop the slot once created (even if there is no activity on the primary during PrimaryCatchupWaitAttempt attempts) so

Re: [PGDOCS] Inconsistent linkends to "monitoring" views.

2023-11-07 Thread John Naylor
On Tue, Oct 3, 2023 at 4:40 PM Peter Smith wrote: > > On Tue, Oct 3, 2023 at 6:30 PM Michael Paquier wrote: > > > > On Tue, Oct 03, 2023 at 01:11:15PM +1100, Peter Smith wrote: > > > I noticed one or two "monitoring" links and linkends that are slightly > > > inconsistent from all the others. >

Re: Infinite Interval

2023-11-07 Thread jian he
On Wed, Nov 8, 2023 at 7:42 AM Dean Rasheed wrote: > > On Tue, 7 Nov 2023 at 14:33, Dean Rasheed wrote: > > > > New version attached doing that, to run it past the cfbot again. > > > > Ah, Windows Server didn't like that. Trying again with "INT64CONST(0)" > instead of just "0" in interval_um().

ensure, not insure

2023-11-07 Thread Peter Smith
Hi, While looking at GUC messages today I noticed the following: gettext_noop("The server will use the fsync() system call in several places to make " "sure that updates are physically written to disk. This insures " "that a database cluster will recover to a consistent state after " "an

Re: Version 14/15 documentation Section "Alter Default Privileges"

2023-11-07 Thread Michael Banck
Hi, On Tue, Nov 07, 2023 at 05:30:20PM -0500, Bruce Momjian wrote: > On Mon, Nov 6, 2023 at 09:53:50PM +0100, Laurenz Albe wrote: > > + > > + There is no way to change the default privileges for objects created by > > + arbitrary roles. You have run ALTER DEFAULT > > PRIVILEGES > > I

Re: Syncrep and improving latency due to WAL throttling

2023-11-07 Thread Andres Freund
Hi, On 2023-11-04 20:00:46 +0100, Tomas Vondra wrote: > scope > - > Now, let's talk about scope - what the patch does not aim to do. The > patch is explicitly intended for syncrep clusters, not async. There have > been proposals to also support throttling for async replicas, logical >

Re: pg_upgrade and logical replication

2023-11-07 Thread vignesh C
On Mon, 6 Nov 2023 at 07:51, Peter Smith wrote: > > Here are some review comments for patch v11-0001 > > == > Commit message > > 1. > The subscription's replication origin are needed to ensure > that we don't replicate anything twice. > > ~ > > /are needed/is needed/ Modified > > 2. >

Re: [PoC] Implementation of distinct in Window Aggregates: take two

2023-11-07 Thread Shlok Kyal
Hi, I went through the Cfbot, and some of the test cases are failing for this patch. It seems like some tests are crashing: https://api.cirrus-ci.com/v1/artifact/task/6291153444667392/crashlog/crashlog-postgres.exe_03b0_2023-11-07_10-41-39-624.txt [10:46:56.546] Summary of Failures:

Re: Fix use of openssl.path() if openssl isn't found

2023-11-07 Thread Tristan Partin
On Tue Nov 7, 2023 at 11:53 PM CST, Michael Paquier wrote: On Tue, Nov 07, 2023 at 04:06:56PM -0600, Tristan Partin wrote: > Found this issue during my Fedora 39 upgrade. Tested that uninstalling > openssl still allows the various ssl tests to run and succeed. Good catch. You are right that

Re: Show WAL write and fsync stats in pg_stat_io

2023-11-07 Thread Michael Paquier
On Wed, Nov 08, 2023 at 10:27:44AM +0900, Michael Paquier wrote: > Yep, I'd be OK with that as well to maintain compatibility. By the way, note that the patch is failing to apply, and that I've switched it as waiting on author on 10/26. -- Michael signature.asc Description: PGP signature

Re: Fix use of openssl.path() if openssl isn't found

2023-11-07 Thread Michael Paquier
On Tue, Nov 07, 2023 at 04:06:56PM -0600, Tristan Partin wrote: > Found this issue during my Fedora 39 upgrade. Tested that uninstalling > openssl still allows the various ssl tests to run and succeed. Good catch. You are right that this is inconsistent with what we expect in the test. >

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2023-11-07 Thread Dilip Kumar
On Wed, Nov 8, 2023 at 10:52 AM Amul Sul wrote: Thanks for review Amul, > Here are some minor comments: > > + * By default, we'll use 1MB of for every 1GB of shared buffers, up to the > + * maximum value that slru.c will allow, but always at least 16 buffers. > */ > Size >

Re: Fix output of zero privileges in psql

2023-11-07 Thread Shubham Khanna
On Wed, Nov 8, 2023 at 10:46 AM Laurenz Albe wrote: > > On Sat, 2023-10-21 at 04:29 +0200, Erik Wienhold wrote: > > The attached v3 of my initial patch > > does that. It also includes Laurenz' fix to no longer ignore \pset null > > (minus the doc changes that suggest using \pset null to

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2023-11-07 Thread Amul Sul
On Fri, Nov 3, 2023 at 10:59 AM Dilip Kumar wrote: > On Mon, Oct 30, 2023 at 11:50 AM Dilip Kumar > wrote: > > [...] > [1] 0001-Make-all-SLRU-buffer-sizes-configurable: This is the same > patch as the previous patch set > [2] 0002-Add-a-buffer-mapping-table-for-SLRUs: Patch to introduce >

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2023-11-07 Thread Amul Sul
On Mon, Nov 6, 2023 at 4:44 PM Andrey M. Borodin wrote: > > > > On 6 Nov 2023, at 14:31, Alvaro Herrera wrote: > > > > dynahash is notoriously slow, which is why we have simplehash.h since > > commit b30d3ea824c5. Maybe we could use that instead. > > Dynahash has lock partitioning. Simplehash

Re: Reconcile stats in find_tabstat_entry() and get rid of PgStat_BackendFunctionEntry

2023-11-07 Thread Andres Freund
On 2023-10-30 08:25:17 +0900, Michael Paquier wrote: > On Fri, Oct 27, 2023 at 09:45:52AM +0200, Drouvot, Bertrand wrote: > > Done in V8 attached (pgindent has been run on pgstatfuncs.c and > > pgstat_relation.c). > > And applied that after editing a bit the comments. Thank you both!

Re: Add new option 'all' to pg_stat_reset_shared()

2023-11-07 Thread Andres Freund
Hi, On 2023-11-08 10:08:42 +0900, Kyotaro Horiguchi wrote: > At Mon, 6 Nov 2023 14:00:13 +0530, Bharath Rupireddy > wrote in > > On Mon, Nov 6, 2023 at 11:39 AM torikoshia > > wrote: > > > Since each stats, except wal_prefetch was reset acquiring LWLock, > > > attached PoC patch makes the

Re: Add new option 'all' to pg_stat_reset_shared()

2023-11-07 Thread Andres Freund
Hi, On 2023-11-06 14:00:13 +0530, Bharath Rupireddy wrote: > On Mon, Nov 6, 2023 at 11:39 AM torikoshia wrote: > > > > Thanks all for the comments! > > > > On Fri, Nov 3, 2023 at 5:17 AM Matthias van de Meent > > wrote: > > > Knowing that your metrics have a shared starting point can be quite >

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

2023-11-07 Thread Amit Kapila
On Wed, Nov 8, 2023 at 8:44 AM vignesh C wrote: > > While verifying upgrade of subscriber patch, I found one issue with > upgrade in verbose mode. > I was able to reproduce this issue by performing a upgrade with a > verbose option. > > The trace for the same is given below: > Program received

Re: Synchronizing slots from primary to standby

2023-11-07 Thread Amit Kapila
On Tue, Nov 7, 2023 at 7:58 PM Drouvot, Bertrand wrote: > > On 11/7/23 11:55 AM, Amit Kapila wrote: > >>> > >>> This is not full proof solution but optimization over first one. Now > >>> in any sync-cycle, we take 2 attempts for slots-creation (if any slots > >>> are available to be created). In

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

2023-11-07 Thread vignesh C
On Tue, 7 Nov 2023 at 13:25, Amit Kapila wrote: > > On Tue, Nov 7, 2023 at 10:01 AM Zhijie Hou (Fujitsu) > wrote: > > > > On Tuesday, November 7, 2023 12:14 PM Kuroda, Hayato/黒田 隼人 > > wrote: > > > > > > Dear hackers, > > > > > > PSA the patch to solve the issue [1]. > > > > > > Kindly Peter

Re: Show WAL write and fsync stats in pg_stat_io

2023-11-07 Thread Michael Paquier
On Tue, Nov 07, 2023 at 05:19:28PM -0800, Andres Freund wrote: > Another approach would be to fetch the relevant columns from pg_stat_io in the > pg_stat_wal view. That'd avoid double accounting and breaking existing > monitoring. Yep, I'd be OK with that as well to maintain compatibility. --

Re: Add new option 'all' to pg_stat_reset_shared()

2023-11-07 Thread Michael Paquier
On Wed, Nov 08, 2023 at 10:08:42AM +0900, Kyotaro Horiguchi wrote: > At Mon, 6 Nov 2023 14:00:13 +0530, Bharath Rupireddy > wrote in > I must say, I have reservations about this approach. The main concern > is the duplication of reset code, which has been efficiently > encapsulated for

Re: Show WAL write and fsync stats in pg_stat_io

2023-11-07 Thread Andres Freund
Hi, On 2023-11-08 09:52:16 +0900, Michael Paquier wrote: > By the way, if the write/sync quantities and times begin to be tracked > by pg_stat_io, I'd see a pretty good argument in removing the > equivalent columns in pg_stat_wal. It looks like this would reduce > the confusion related to the

Re: Atomic ops for unlogged LSN

2023-11-07 Thread Andres Freund
Hi, On 2023-11-07 00:57:32 +, John Morris wrote: > I found the comment about cache coherency a bit confusing. We are dealing > with a single address, so there should be no memory ordering or coherency > issues. (Did I misunderstand?) I see it more as a race condition. IMO cache coherency

Re: Add new option 'all' to pg_stat_reset_shared()

2023-11-07 Thread Kyotaro Horiguchi
At Mon, 6 Nov 2023 14:00:13 +0530, Bharath Rupireddy wrote in > On Mon, Nov 6, 2023 at 11:39 AM torikoshia wrote: > > Since each stats, except wal_prefetch was reset acquiring LWLock, > > attached PoC patch makes the call atomic by using these LWlocks. > > > > If this is the right direction,

Re: Atomic ops for unlogged LSN

2023-11-07 Thread Andres Freund
Hi, On 2023-11-07 11:02:49 -0600, Nathan Bossart wrote: > On Tue, Nov 07, 2023 at 11:47:46AM -0500, Stephen Frost wrote: > > We only care about the value of the unlogged LSN being correct during > > normal shutdown when we're writing out the shutdown checkpoint, but by > > that time everything

Re: Show WAL write and fsync stats in pg_stat_io

2023-11-07 Thread Michael Paquier
On Tue, Nov 07, 2023 at 03:30:48PM -0800, Andres Freund wrote: > I strongly disagree. A significant part of the design of pg_stat_io was to > make it possible to collect multiple sources of IO in a single view, so that > sysadmins don't have to look in dozens of places to figure out what is

Re: Moving forward with TDE [PATCH v3]

2023-11-07 Thread Andres Freund
Hi, On 2023-11-06 11:26:44 +0100, Matthias van de Meent wrote: > On Sat, 4 Nov 2023 at 03:38, Andres Freund wrote: > > On 2023-11-02 22:09:40 +0100, Matthias van de Meent wrote: > > > I'm quite surprised at the significant number of changes being made > > > outside the core storage manager

Re: Call pqPipelineFlush from PQsendFlushRequest

2023-11-07 Thread Michael Paquier
On Tue, Nov 07, 2023 at 12:43:18PM +0100, Alvaro Herrera wrote: > I agree, and I intend to get this patch pushed once the release freeze > is lifted. Thanks! -- Michael signature.asc Description: PGP signature

Re: Force the old transactions logs cleanup even if checkpoint is skipped

2023-11-07 Thread Michael Paquier
On Tue, Oct 17, 2023 at 02:09:21PM +, Zakhlystov, Daniil (Nebius) wrote: > I've stumbled into an interesting problem. Currently, if Postgres > has nothing to write, it would skip the checkpoint creation defined > by the checkpoint timeout setting. However, we might face a > temporary archiving

Re: [PATCHES] Post-special page storage TDE support

2023-11-07 Thread Andres Freund
Hi, On 2023-05-09 17:08:26 -0500, David Christensen wrote: > From 965309ea3517fa734c4bc89c144e2031cdf6c0c3 Mon Sep 17 00:00:00 2001 > From: David Christensen > Date: Tue, 9 May 2023 16:56:15 -0500 > Subject: [PATCH v4 1/3] Add reserved_page_space to Page structure > > This space is reserved for

Re: Cleaning up array_in()

2023-11-07 Thread Tom Lane
I got back to looking at this today (sorry for delay), and did a pass of code review. I think we are getting pretty close to something committable. The one loose end IMO is this bit in ReadArrayToken: +case '"': + +/* + * XXX "Unexpected %c character"

Re: Moving forward with TDE [PATCH v3]

2023-11-07 Thread Andres Freund
Hi, On 2023-11-06 09:56:37 -0500, Stephen Frost wrote: > * Andres Freund (and...@anarazel.de) wrote: > > I still am quite quite unconvinced that using the LSN as a nonce is a good > > design decision. > > This is a really important part of the overall path to moving this > forward, so I wanted

Re: Show WAL write and fsync stats in pg_stat_io

2023-11-07 Thread Andres Freund
Hi, On 2023-10-26 15:28:32 +0900, Michael Paquier wrote: > On top of that pg_stat_io is now for block-based I/O operations, so > that does not fit entirely in the picture, though I guess that Melanie > has thought more on the matter than me. That may be also a matter of > taste. I strongly

Re: speed up a logical replica setup

2023-11-07 Thread Michael Paquier
On Tue, Nov 07, 2023 at 10:00:39PM +0100, Peter Eisentraut wrote: > Speaking of which, would it make sense to put this tool (whatever the name) > into the pg_basebackup directory? It's sort of related, and it also shares > some code. I've read the patch, and the additions to streamutil.h and

Re: Moving forward with TDE [PATCH v3]

2023-11-07 Thread Stephen Frost
Greetings, * Bruce Momjian (br...@momjian.us) wrote: > On Mon, Nov 6, 2023 at 09:56:37AM -0500, Stephen Frost wrote: > > The gist is, without a suggestion of things to try, we're left > > to our own devices to try and figure out things which might be > > successful, only to have those turned

Re: Version 14/15 documentation Section "Alter Default Privileges"

2023-11-07 Thread Bruce Momjian
On Mon, Nov 6, 2023 at 09:53:50PM +0100, Laurenz Albe wrote: > On Mon, 2023-11-06 at 10:55 -0500, Bruce Momjian wrote: > > Okay, I think I have good wording for this. I didn't like the wording > > of other roles, so I restructured that in the attached patch too. > > > > > !Default

Fix use of openssl.path() if openssl isn't found

2023-11-07 Thread Tristan Partin
Found this issue during my Fedora 39 upgrade. Tested that uninstalling openssl still allows the various ssl tests to run and succeed. -- Tristan Partin Neon (https://neon.tech) From d684d6fc1546335804d2ed82ff909991965a61a8 Mon Sep 17 00:00:00 2001 From: Tristan Partin Date: Tue, 7 Nov 2023

Re: Fix search_path for all maintenance commands

2023-11-07 Thread Jeff Davis
On Tue, 2023-10-31 at 13:16 -0400, Isaac Morland wrote: > Perhaps the search_path for running a maintenance command should be > the search_path set for the table owner (ALTER ROLE … SET search_path > …)? After some thought, I don't think that's the right approach. It adds another way search path

Re: Compiler warning on Debian 12, PostgreSQL 16 Beta3

2023-11-07 Thread Thomas Munro
On Wed, Nov 8, 2023 at 8:13 AM Alvaro Herrera wrote: > On 2023-Nov-08, Thomas Munro wrote: > > On Wed, Nov 8, 2023 at 4:46 AM Alvaro Herrera > > wrote: > > > On 2023-Aug-25, Daniel Westermann (DWE) wrote: > > > > > > Yeah, I get this one too. I thought commit 37d5babb5cfa ("jit: Support > > >

Re: speed up a logical replica setup

2023-11-07 Thread Peter Eisentraut
On 23.10.23 05:53, Euler Taveira wrote: Let's continue with the bike shedding... I agree with Peter E that this name does not express what this tool is. At the moment, it only have one action: create. If I have to suggest other actions I would say that it could support switchover option too

Re: Add the ability to limit the amount of memory that can be allocated to backends.

2023-11-07 Thread Stephen Frost
Greetings, * Andres Freund (and...@anarazel.de) wrote: > On 2023-11-06 13:02:50 -0500, Stephen Frost wrote: > > > > The max_total_memory limit is checked whenever the global counters are > > > > updated. There is no special error handling if a memory allocation > > > > exceeds > > > > the global

Re: GUC names in messages

2023-11-07 Thread Peter Smith
FWIW, I am halfway through doing regex checking of the PG16 source for all GUC names in messages to see what current styles are in use today. Not sure if those numbers will influence the decision. I hope I can post my findings today or tomorrow. == Kind Regards, Peter Smith. Fujitsu

Re: Popcount optimization using AVX512

2023-11-07 Thread Nathan Bossart
On Mon, Nov 06, 2023 at 09:53:15PM -0800, Noah Misch wrote: > On Mon, Nov 06, 2023 at 09:59:26PM -0600, Nathan Bossart wrote: >> On Mon, Nov 06, 2023 at 07:15:01PM -0800, Noah Misch wrote: >> > The glibc/gcc "ifunc" mechanism was designed to solve this problem of >> > choosing >> > a function

Re: Add the ability to limit the amount of memory that can be allocated to backends.

2023-11-07 Thread Andres Freund
Hi, On 2023-11-06 13:02:50 -0500, Stephen Frost wrote: > > > The max_total_memory limit is checked whenever the global counters are > > > updated. There is no special error handling if a memory allocation exceeds > > > the global limit. That allocation returns a NULL for malloc style > > >

Re: Compiler warning on Debian 12, PostgreSQL 16 Beta3

2023-11-07 Thread Alvaro Herrera
On 2023-Nov-08, Thomas Munro wrote: > On Wed, Nov 8, 2023 at 4:46 AM Alvaro Herrera wrote: > > On 2023-Aug-25, Daniel Westermann (DWE) wrote: > > > > Yeah, I get this one too. I thought commit 37d5babb5cfa ("jit: Support > > opaque pointers in LLVM 16.") was going to silence it, but I was quite

Re: Compiler warning on Debian 12, PostgreSQL 16 Beta3

2023-11-07 Thread Thomas Munro
On Wed, Nov 8, 2023 at 4:46 AM Alvaro Herrera wrote: > On 2023-Aug-25, Daniel Westermann (DWE) wrote: > > I've just noticed this warning when building on Debian 12: > > > > In file included from > > /usr/lib/llvm-14/include/llvm/Analysis/ModuleSummaryAnalysis.h:17, > > from

Re: 2023-11-09 release announcement draft

2023-11-07 Thread Noah Misch
On Tue, Nov 07, 2023 at 09:02:03AM -0500, Jonathan S. Katz wrote: > On 11/6/23 9:52 PM, Noah Misch wrote: > > On Mon, Nov 06, 2023 at 05:04:25PM -0500, Jonathan S. Katz wrote: > > Delete lines starting here ... > > > > > This is the **final release of PostgreSQL 11**. PostgreSQL 10 will no > >

Re: meson documentation build open issues

2023-11-07 Thread Christoph Berg
Re: Andres Freund > > We might get around that by introducing a new postgresql-manpages-XX > > arch:all package, but that might be too much micropackaging. > > I've not done packaging in, uh, a fair while, but isn't the common solution to > that a -common package? There might be a few more files

Re: Atomic ops for unlogged LSN

2023-11-07 Thread Nathan Bossart
On Tue, Nov 07, 2023 at 11:47:46AM -0500, Stephen Frost wrote: > We only care about the value of the unlogged LSN being correct during > normal shutdown when we're writing out the shutdown checkpoint, but by > that time everything else has been shut down and the value absolutely > should not be

Re: meson documentation build open issues

2023-11-07 Thread Andres Freund
Hi, On 2023-11-06 10:45:27 +0100, Christoph Berg wrote: > Re: Andres Freund > > > > The reason for that is simply that the docs take too long to build. > > > > > > That why I'd prefer to be able to separate arch:all and arch:any > > > builds, yes. > > > > What's stopping you from doing that? I

Re: meson documentation build open issues

2023-11-07 Thread Tom Lane
Alvaro Herrera writes: > If the problem is broken doc patches, then maybe a solution is to > include the `xmllint --noout --valid` target in whatever the check-world > equivalent is for meson. +1, but let's do that for the "make" build too. I see that doc/src/sgml/Makefile has a "check" target,

Re: Atomic ops for unlogged LSN

2023-11-07 Thread Stephen Frost
Greetings, * Nathan Bossart (nathandboss...@gmail.com) wrote: > On Tue, Nov 07, 2023 at 12:57:32AM +, John Morris wrote: > > I incorporated your suggestions and added a few more. The changes are > > mainly related to catching potential errors if some basic assumptions > > aren’t met. > > Hm.

Re: meson documentation build open issues

2023-11-07 Thread Alvaro Herrera
On 2023-Nov-07, Andres Freund wrote: > >I would like to have some set of options that enables it so that the > >standard documentation targets become part of "meson compile" and > >"meson install". > > -0.5 - it's just too painfully slow. For all scripted uses you can just as > well use

Re: meson documentation build open issues

2023-11-07 Thread Tom Lane
Andres Freund writes: > On November 7, 2023 7:55:37 AM PST, Peter Eisentraut > wrote: >> I would like to have some set of options that enables it so that the >> standard documentation targets become part of "meson compile" and "meson >> install". > -0.5 - it's just too painfully slow. For

Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

2023-11-07 Thread Maxim Orlov
On Mon, 6 Nov 2023 at 16:07, Alexander Korotkov wrote: > Hi! > > On Wed, Jul 5, 2023 at 4:46 PM Aleksander Alekseev < > aleksan...@timescale.com> wrote: > > PFE the corrected patchset v58. > > I'd like to revive this thread. > Hi! Great news! > BTW, there is a typo in a word "exceeed". >

Re: ALTER TABLE uses a bistate but not for toast tables

2023-11-07 Thread Matthias van de Meent
Hi Justin, This patch has gone stale quite some time ago; CFbot does not seem to have any history of a successful apply attemps, nor do we have any succesful build history (which was introduced some time ago already). Are you planning on rebasing this patch? Kind regards, Matthias van de Meent

Re: meson documentation build open issues

2023-11-07 Thread Andres Freund
Hi, On November 7, 2023 7:55:37 AM PST, Peter Eisentraut wrote: >On 03.11.23 19:19, Christoph Berg wrote: > You can control this with the "docs" option for meson, as of recently. I've been looking into switching the Debian PG 17 build to meson, but I'm running into several

Re: meson documentation build open issues

2023-11-07 Thread Peter Eisentraut
On 03.11.23 19:19, Christoph Berg wrote: You can control this with the "docs" option for meson, as of recently. I've been looking into switching the Debian PG 17 build to meson, but I'm running into several problems. * The docs are still not built by default, and -Ddocs=enabled doesn't

Re: Compiler warning on Debian 12, PostgreSQL 16 Beta3

2023-11-07 Thread Alvaro Herrera
On 2023-Aug-25, Daniel Westermann (DWE) wrote: > I've just noticed this warning when building on Debian 12: > > In file included from > /usr/lib/llvm-14/include/llvm/Analysis/ModuleSummaryAnalysis.h:17, > from llvmjit_inline.cpp:51: >

Re: Buffer Cache Problem

2023-11-07 Thread Matthias van de Meent
On Tue, 7 Nov 2023 at 14:28, jacktby jacktby wrote: > > Hi, postgres hackers, I’m studying postgres buffer cache part. So I open this > thread to communicate some buffer cache codes design and try to improve some > tricky codes. > > For Buffer Cache, we know it’s a buffer array, every bucket of

Re: meson documentation build open issues

2023-11-07 Thread Peter Eisentraut
On 03.11.23 22:16, Andres Freund wrote: [selinux option] Why isn't it "auto" like the others? I don't really remember why I did that, but it's platform specific, maybe that's why I did it that way? Isn't that kind the point of autodetecting things? Aren't bonjour and bsd_auth autodetected as

Re: Protocol question regarding Portal vs Cursor

2023-11-07 Thread Tom Lane
Dave Cramer writes: > If we use a Portal it is possible to open the portal and do a describe and > then Fetch N records. > Using a Cursor we open the cursor. Is there a corresponding describe and a > way to fetch N records without getting the fields each time. Currently we > have to send the SQL

Re: Relids instead of Bitmapset * in plannode.h

2023-11-07 Thread Tom Lane
Alvaro Herrera writes: > On 2023-Oct-31, Ashutosh Bapat wrote: >> For some reason plannode.h has declared variable to hold RTIs as >> Bitmapset * instead of Relids like other places. Here's patch to fix >> it. This is superficial change as Relids is typedefed to Bitmapset *. >> Build succeeds for

MERGE: AFTER ROW trigger failure for cross-partition update

2023-11-07 Thread Dean Rasheed
While working on the MERGE RETURNING patch, I noticed a pre-existing MERGE bug --- ExecMergeMatched() should not call ExecUpdateEpilogue() if ExecUpdateAct() indicates that it did a cross-partition update. The immediate consequence is that it incorrectly tries (and fails) to fire AFTER UPDATE ROW

Re: Commitfest: older Waiting on Author entries

2023-11-07 Thread Nathan Bossart
On Tue, Nov 07, 2023 at 03:27:53PM +0700, John Naylor wrote: > The following entries are WoA but have not had an email update since > July. If there is no actionable update soon, I plan to mark these > Returned with Feedback before end of CF: > > pg_usleep for multisecond delays > vector search

Re: GUC names in messages

2023-11-07 Thread Nathan Bossart
On Tue, Nov 07, 2023 at 10:33:03AM +0100, Alvaro Herrera wrote: > On 2023-Nov-01, Nathan Bossart wrote: >> +1, IMHO quoting GUC names makes it abundantly clear that they are special >> identifiers. In de4d456, we quoted the role names in a bunch of messages. >> We didn't quote the

Re: GUC names in messages

2023-11-07 Thread Tom Lane
Alvaro Herrera writes: > On 2023-Nov-01, Nathan Bossart wrote: >> +1, IMHO quoting GUC names makes it abundantly clear that they are special >> identifiers. In de4d456, we quoted the role names in a bunch of messages. >> We didn't quote the attribute/option names, but those are in all-caps, so

Re: ALTER COLUMN ... SET EXPRESSION to alter stored generated column's expression

2023-11-07 Thread Peter Eisentraut
On 25.10.23 08:12, Amul Sul wrote: Here is the rebase version for the latest master head(673a17e3120). I haven't done any other changes related to the ON UPDATE trigger since that seems non-trivial; need a bit of work to add trigger support in ATRewriteTable(). Also, I am not sure yet, if we

Re: Synchronizing slots from primary to standby

2023-11-07 Thread Drouvot, Bertrand
Hi, On 11/7/23 11:55 AM, Amit Kapila wrote: On Tue, Nov 7, 2023 at 3:51 PM Drouvot, Bertrand wrote: On 10/31/23 10:37 AM, shveta malik wrote: On Fri, Oct 27, 2023 at 8:43 PM Drouvot, Bertrand Agree with your test case, but in my case I was not using pub/sub. I was not clear, so when I

Re: 2023-11-09 release announcement draft

2023-11-07 Thread Jonathan S. Katz
On 11/6/23 9:52 PM, Noah Misch wrote: On Mon, Nov 06, 2023 at 05:04:25PM -0500, Jonathan S. Katz wrote: The PostgreSQL Global Development Group has released an update to all supported versions of PostgreSQL, including 16.1, 15.5, 14.10, 13.13, 12.17, and 11.22 This release fixes over 55 bugs

Re: ResourceOwner refactoring

2023-11-07 Thread Alexander Lakhin
Hello Heikki, 07.11.2023 14:28, Heikki Linnakangas wrote: I feel pretty good about this overall. Barring objections or new cfbot failures, I will commit this in the next few days. A script, that I published in [1], detects several typos in the patches: betwen ther ReourceOwner

Buffer Cache Problem

2023-11-07 Thread jacktby jacktby
Hi, postgres hackers, I’m studying postgres buffer cache part. So I open this thread to communicate some buffer cache codes design and try to improve some tricky codes. For Buffer Cache, we know it’s a buffer array, every bucket of this array is consist of a data page and its header which is

Re: 2023-11-09 release announcement draft

2023-11-07 Thread Matthias van de Meent
On Mon, 6 Nov 2023 at 23:04, Jonathan S. Katz wrote: > > Hi, > > Attached is the release announcement draft for the 2023-11-09 release > (16.1 et al.). > > Please review for accuracy and notable omissions. Please have all > feedback in by 2023-11-09 08:00 UTC at the latest (albeit the sooner the

Re: collect_corrupt_items_vacuum.patch

2023-11-07 Thread Alexander Lakhin
07.11.2023 14:38, Alexander Korotkov wrote: Hi, Alexander. On Tue, Nov 7, 2023 at 1:00 PM Alexander Lakhin wrote: It looks like the v2 patch doesn't fix the original issue. Maybe I miss something, but with the patch applied, I see the failure immediately, though without the patch several

Re: Optimizing nbtree ScalarArrayOp execution, allowing multi-column ordered scans, skip scan

2023-11-07 Thread Matthias van de Meent
On Tue, 7 Nov 2023 at 00:03, Peter Geoghegan wrote: > > On Mon, Nov 6, 2023 at 1:28 PM Matthias van de Meent > wrote: > > I'm planning on reviewing this patch tomorrow, but in an initial scan > > through the patch I noticed there's little information about how the > > array keys state machine

Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

2023-11-07 Thread Aleksander Alekseev
Hi again, > PFA the corrected patchset v59. On second thought, I believe this Assert is incorrect: ``` +else +{ +Assert(segno >= 0 && segno <= 0x); +return snprintf(path, MAXPGPATH, "%s/%04X", (ctl)->Dir, +(unsigned int) segno); +} ```

Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

2023-11-07 Thread Aleksander Alekseev
Hi Alexander, > -#define TransactionIdToCTsPage(xid) \ > - ((xid) / (TransactionId) COMMIT_TS_XACTS_PER_PAGE) > + > +/* > + * Although we return an int64 the actual value can't currently exceeed > 2**32. > + */ > +static inline int64 > +TransactionIdToCTsPage(TransactionId xid) > +{ > +

Re: RFC: Pluggable TOAST

2023-11-07 Thread Matthias van de Meent
On Tue, 7 Nov 2023 at 11:06, Nikita Malakhov wrote: > > Hi, > > I've been thinking about Matthias' proposals for some time and have some > questions: > > >So, in short, I don't think there is a need for a specific "Pluggable > >toast API" like the one in the patchset at [0] that can be loaded >

Re: Call pqPipelineFlush from PQsendFlushRequest

2023-11-07 Thread Alvaro Herrera
On 2023-Nov-07, Michael Paquier wrote: > On Tue, Nov 07, 2023 at 10:38:04AM +0100, Jelte Fennema-Nio wrote: > > In pipeline mode after queuing a message to be sent we would flush the > > buffer if the size of the buffer passed some threshold. The only message > > type that we didn't do that for

Re: collect_corrupt_items_vacuum.patch

2023-11-07 Thread Alexander Korotkov
Hi, Alexander. On Tue, Nov 7, 2023 at 1:00 PM Alexander Lakhin wrote: > It looks like the v2 patch doesn't fix the original issue. Maybe I miss > something, but with the patch applied, I see the failure immediately, > though without the patch several iterations are needed to get it. That's a

Protocol question regarding Portal vs Cursor

2023-11-07 Thread Dave Cramer
Greetings, If we use a Portal it is possible to open the portal and do a describe and then Fetch N records. Using a Cursor we open the cursor. Is there a corresponding describe and a way to fetch N records without getting the fields each time. Currently we have to send the SQL "fetch N" and we

Re: ResourceOwner refactoring

2023-11-07 Thread Heikki Linnakangas
On 25/10/2023 21:07, Andres Freund wrote: It's not too awful to have it be in this order: struct ResourceOwnerData { ResourceOwner parent; /* 0 8 */ ResourceOwner firstchild; /* 8 8 */ ResourceOwner

Re: Call pqPipelineFlush from PQsendFlushRequest

2023-11-07 Thread Michael Paquier
On Tue, Nov 07, 2023 at 10:38:04AM +0100, Jelte Fennema-Nio wrote: > In pipeline mode after queuing a message to be sent we would flush the > buffer if the size of the buffer passed some threshold. The only message > type that we didn't do that for was the Flush message. This addresses > that

Re: Relids instead of Bitmapset * in plannode.h

2023-11-07 Thread Alvaro Herrera
Hello, On 2023-Oct-31, Ashutosh Bapat wrote: > For some reason plannode.h has declared variable to hold RTIs as > Bitmapset * instead of Relids like other places. Here's patch to fix > it. This is superficial change as Relids is typedefed to Bitmapset *. > Build succeeds for me and also make

Re: collect_corrupt_items_vacuum.patch

2023-11-07 Thread Alexander Lakhin
Hi Alexander, 06.11.2023 12:30, Alexander Korotkov wrote: Surely these would significantly sacrifice accuracy. But we have to do so in order to avoid reporting false errors. I've reduced the dirty reproducer Daniel Shelepanov posted initially to the following: numdbs=10 for

Re: Synchronizing slots from primary to standby

2023-11-07 Thread Amit Kapila
On Tue, Nov 7, 2023 at 3:51 PM Drouvot, Bertrand wrote: > > On 10/31/23 10:37 AM, shveta malik wrote: > > On Fri, Oct 27, 2023 at 8:43 PM Drouvot, Bertrand > >> > >> Agree with your test case, but in my case I was not using pub/sub. > >> > >> I was not clear, so when I said: > >> > - create

Re: A recent message added to pg_upgade

2023-11-07 Thread Amit Kapila
On Tue, Nov 7, 2023 at 8:12 AM Michael Paquier wrote: > > On Tue, Nov 07, 2023 at 07:59:46AM +0530, Amit Kapila wrote: > > Do you mean to say that if 'IsBinaryUpgrade' is true then let's not > > allow to launch launcher or apply worker? If so, I guess this won't be > > any better than prohibiting

Re: Synchronizing slots from primary to standby

2023-11-07 Thread Drouvot, Bertrand
Hi, On 10/31/23 10:37 AM, shveta malik wrote: On Fri, Oct 27, 2023 at 8:43 PM Drouvot, Bertrand Agree with your test case, but in my case I was not using pub/sub. I was not clear, so when I said: - create logical_slot1 on the primary (and don't start using it) I meant don't start

Re: RFC: Pluggable TOAST

2023-11-07 Thread Nikita Malakhov
Hi, I've been thinking about Matthias' proposals for some time and have some questions: >So, in short, I don't think there is a need for a specific "Pluggable >toast API" like the one in the patchset at [0] that can be loaded >on-demand, but I think that updating our current TOAST system to a

  1   2   >