Re: Question about VACUUM behavior with sub-transactions in stored procedures

2024-10-31 Thread Кириллов Вячеслав
Hello everyone, I'd like to revisit the topic of auto VACUUM's interaction with stored procedures that perform transactions, with a more technical clarification as suggested earlier. Let's consider the behavior of VACUUM and system table updates after transaction commits in procedures that freq

Re: Count and log pages set all-frozen by vacuum

2024-10-31 Thread Alastair Turner
Hi Melanie On Wed, 30 Oct 2024 at 21:42, Melanie Plageman wrote: > ... > The number of pages set all-frozen in the visibility map by a given > vacuum can be useful when analyzing which normal vacuums reduce the > number of pages future aggressive vacuum need to scan. > > Also, empty pages that a

Re: Question about VACUUM behavior with sub-transactions in stored procedures

2024-10-31 Thread Кириллов Вячеслав
Hello everyone, I'd like to revisit the topic of auto VACUUM's interaction with stored procedures that perform transactions, with a more technical clarification as suggested earlier. Let's consider the behavior of VACUUM and system table updates after transaction commits in procedures that freq

Re: Index AM API cleanup

2024-10-31 Thread Mark Dilger
> On Oct 30, 2024, at 12:54 PM, Peter Eisentraut wrote: > > So this is the idea. To take a step back, I can see the following > options: > > 1. Require all index AMs to use btree-compatible strategy numbers. > (Previously rejected, too much upgrading mess.) > > 2. Provide mapping between

Re: Segfault in jit tuple deforming on arm64 due to LLVM issue

2024-10-31 Thread Anthonin Bonnefoy
On Thu, Oct 31, 2024 at 6:49 AM Thomas Munro wrote: > There are a couple of cases of dual-licensed code in our tree where we > explicitly used the Boost alternative instead of Apache 2. I plead > complete ignorance of this topic and defer to those who know about > such things: can we actually do

Re: Test to dump and restore objects left behind by regression

2024-10-31 Thread Michael Paquier
On Mon, Sep 09, 2024 at 03:43:58PM +0530, Ashutosh Bapat wrote: > 894be11adfa60ad1ce5f74534cf5f04e66d51c30 changed the schema in which > objects in test genereated_stored.sql are created. Because of this the > new test added by the patch was failing. Fixed the failure in the > attached. On my lapt

Re: Pgoutput not capturing the generated columns

2024-10-31 Thread Ajin Cherian
On Thu, Oct 31, 2024 at 9:55 PM Ajin Cherian wrote: > I ran some tests and verified that the patch works with previous versions > of PG12 and PG17 > 1. Verified with publications with generated columns and without generated > columns on patched code and subscriptions on PG12 and PG17 > Observatio

Time to add a Git .mailmap?

2024-10-31 Thread Daniel Gustafsson
When looking at our Git tree for a recent conference presentation I happened to notice that we have recently gained duplicate names in the shortlog. Not sure if we care enough to fix that with a .mailmap, but if we do the attached diff makes sure that all commits are accounted for a single committ

Re: Count and log pages set all-frozen by vacuum

2024-10-31 Thread Masahiko Sawada
On Wed, Oct 30, 2024 at 2:42 PM Melanie Plageman wrote: > > Vacuum currently counts and logs the number of pages of a relation > with newly frozen tuples. It does not count the number of pages newly > set all-frozen in the visibility map. > > The number of pages set all-frozen in the visibility ma

Re: UUID v7

2024-10-31 Thread Masahiko Sawada
On Sat, Oct 26, 2024 at 10:05 AM Andrey M. Borodin wrote: > > > > > --- > > - oid | proname | oid | proname > > --+-+-+- > > -(0 rows) > > + oid | proname | oid | proname > > +--+-+--+- > > + 9896 | uuidv7 | 9897 | uuidv7 > > +(1 row) > > > > I th

Re: MultiXact\SLRU buffers configuration

2024-10-31 Thread Thom Brown
On Thu, 31 Oct 2024 at 10:47, Andrey M. Borodin wrote: > > > > > On 29 Oct 2024, at 21:45, Thom Brown wrote: > > > > It clearly checks for interrupts, but when I saw this issue happen, it > > wasn't interruptible. > > Perhaps, that was different multixacts? > When I was observing this pathology o

Re: Using read stream in autoprewarm

2024-10-31 Thread Andrey M. Borodin
> On 8 Aug 2024, at 11:32, Nazir Bilal Yavuz wrote: > > Any feedback would be appreciated. I've took a look into the patch. It seems to me that you add new block numbers to the read stream until you have buffers. So when there are no more buffers you will still have some queued blocks. Mayb

Re: [PATCH] Improve code coverage of network address functions

2024-10-31 Thread Aleksander Alekseev
Hi Stepan, > Hello Aleksander! I'm a beginner and I would like to see and try your patch. > However, I have never worked with coverage in regression tests for > PostgreSQL. Could you please tell me how it works and help me understand the > process? Thanks! You are going to need some Linux dist

Re: "command cannot affect row a second time" in INSERT ... ON CONFLICT

2024-10-31 Thread Aleksander Alekseev
Hi Karthik, > I am looking to better understand the applicability of the error message > "command cannot affect row a second time". > > Consider the following table and data: > CREATE TABLE ioc (i int, UNIQUE(i)); > INSERT INTO ioc VALUES (1); > > The following two queries produce different error

Re: WIP: parallel GiST index builds

2024-10-31 Thread Andrey M. Borodin
> On 8 Oct 2024, at 17:05, Tomas Vondra wrote: > > Here's an updated patch adding the queryid. I've took another round of looking through the patch. Everything I see seems correct to me. It just occurred to me that we will have: buffered build, parallel build, sorting build. All 3 aiming to

Re: [PATCH] Improve code coverage of network address functions

2024-10-31 Thread Stepan Neretin
Hello Aleksander! I'm a beginner and I would like to see and try your patch. However, I have never worked with coverage in regression tests for PostgreSQL. Could you please tell me how it works and help me understand the process? Thanks! Best Regards, Stepan Neretin!

Re: RFC: Extension Packaging & Lookup

2024-10-31 Thread David E. Wheeler
Fellow Humans, I’m working on an updated proposal with more detail, and more comprehensive. But I keep getting a bit caught up on this bit: On Oct 28, 2024, at 18:19, David E. Wheeler wrote: >> * Binary-only extensions might also be installed here; the difference is >> they have no control

Re: DOCS - pg_replication_slot . Fix the 'inactive_since' description

2024-10-31 Thread Bruce Momjian
On Thu, Oct 24, 2024 at 08:32:54AM +1100, Peter Smith wrote: > Hi. Here are a couple of minor comments. > > 1. > +The time slot synchronization (see +linkend="logicaldecoding-replication-slots-synchronization"/>) > +was most recently stopped. > > /The time slot/The time w

Re: "command cannot affect row a second time" in INSERT ... ON CONFLICT

2024-10-31 Thread David G. Johnston
On Thu, Oct 31, 2024 at 9:52 AM Karthik Ramanathan < karthikram.3...@gmail.com> wrote: > I am looking to better understand the applicability of the error message > "command cannot affect row a second time". > > Consider the following table and data: > CREATE TABLE ioc (i int, UNIQUE(i)); > INSERT

Re: Changing the default random_page_cost value

2024-10-31 Thread Bruce Momjian
On Thu, Oct 24, 2024 at 08:01:11PM -0400, Greg Sabino Mullane wrote: > On Mon, Oct 14, 2024 at 5:15 PM Bruce Momjian wrote: > > I am not a fan of this patch.  I don't see why _removing_ the magnetic > part helps because you then have no logic for any 1.2 was chosen. > > > Okay, but we h

Re: meson and check-tests

2024-10-31 Thread Nazir Bilal Yavuz
Hi Ashutosh and Jian, Sorry for the late reply and thanks for the feedback! On Fri, 4 Oct 2024 at 16:13, jian he wrote: > > v3, 0001 documentation: > We can at least write something on > https://wiki.postgresql.org/wiki/Meson about this feature. I agree. It seems that I need to apply for an edi

[PATCH] Add support for displaying database service in psql prompt

2024-10-31 Thread Michael Banck
Hi, I think it might be useful to sometimes display the database service (i.e. what is defined in ~/.pg_service.conf and used via psql service=foo) in the psql prompt, e.g. if you have 'test' and 'prod' services, but both have the same database name. This was also suggested to me during a recent c

Re: Count and log pages set all-frozen by vacuum

2024-10-31 Thread Alastair Turner
On Thu, 31 Oct 2024 at 15:26, Melanie Plageman wrote: > On Thu, Oct 31, 2024 at 11:15 AM Peter Geoghegan wrote: > > > > On Thu, Oct 31, 2024 at 10:22 AM Melanie Plageman > > wrote: > > > It seems a better solution would be to find a way to document it or > > > phrase it clearly in the log. It i

Re: Changing the default random_page_cost value

2024-10-31 Thread Tom Lane
Bruce Momjian writes: > On Thu, Oct 24, 2024 at 08:01:11PM -0400, Greg Sabino Mullane wrote: >> Okay, but we have no documented logic on why 4.0 was chosen either. :) > Uh, we do, and it is in the docs: > Random access to mechanical disk storage is normally much more > expensive >

Re: Fix for consume_xids advancing XIDs incorrectly

2024-10-31 Thread Masahiko Sawada
On Wed, Oct 30, 2024 at 12:00 AM Yushi Ogiwara wrote: > > I made a new patch (skip_xid_correctly.diff) that incorporates the > points we discussed: > > 1. Fix the issue that consume_xids consumes nxids+1 XIDs. > 2. Update lastxid when calling GetTopFullTransactionId() to support > nxids==1 case. >

Re: Multi delete wal IDEA

2024-10-31 Thread Melanie Plageman
On Thu, Oct 31, 2024 at 11:42 AM Stepan Neretin wrote: > > Hi there, hackers! How about trying out an idea to add an analog to save > memory in WAL files for deleting records, similar to multi-insert > optimization? This patch is trying to do just that. Hi, Thanks for the patch! Could you expla

Re: Using read stream in autoprewarm

2024-10-31 Thread Stepan Neretin
Dear Nazir, At first A quick look it looks good. I will take a closer look at it tomorrow. Could you please let me know about the performance tests and graphics? Best regards, Stepan Neretin!

Re: UUID v7

2024-10-31 Thread Stepan Neretin
> > I think we typically avoid this kind of check failure by assigning > > uuidv7() and uuidv7(interval) different C functions that call the > > common function. That is, we have pg_proc entries like: > > > > Done. > > >>> > >>> It's odd to me that only uuid_extract_timestamp() supports UUID v6 in

Re: Use "protocol options" name instead of "protocol extensions" everywhere

2024-10-31 Thread Jacob Champion
On Thu, Oct 31, 2024 at 7:51 AM Heikki Linnakangas wrote: > Or keep using "protocol extension" and add a paragraph to the docs to > say explicitly that there's no support for extensions to create protocol > extensions. TLS extensions is a good comparison. Of the three proposed, this last one is m

Re: DOCS - pg_replication_slot . Fix the 'inactive_since' description

2024-10-31 Thread Bruce Momjian
On Fri, Oct 18, 2024 at 04:25:33PM +0530, Amit Kapila wrote: > Few comments: > = > 1. > > - True if this slot is currently actively being used > + True if this slot is currently currently being streamed > > > currently shouldn't be used twice. > > 2. > - /* The ti

Re: Use "protocol options" name instead of "protocol extensions" everywhere

2024-10-31 Thread Jelte Fennema-Nio
On Thu, 31 Oct 2024 at 17:09, Robert Haas wrote: > I don't think it's really viable to promise that we'll never talk > about extending anything other than in the context of what CREATE > EXTENSION does. Agreed, but it seems nice to avoid confusion by not overloading terminology, if we can find a

Re: MultiXact\SLRU buffers configuration

2024-10-31 Thread Andrey M. Borodin
> On 31 Oct 2024, at 17:29, Thom Brown wrote: > > On Thu, 31 Oct 2024 at 10:47, Andrey M. Borodin wrote: >> >> >> >>> On 29 Oct 2024, at 21:45, Thom Brown wrote: >>> >>> It clearly checks for interrupts, but when I saw this issue happen, it >>> wasn't interruptible. >> >> Perhaps, that

Re: UUID v7

2024-10-31 Thread Andrey M. Borodin
> On 31 Oct 2024, at 22:15, Masahiko Sawada wrote: > > On Sat, Oct 26, 2024 at 10:05 AM Andrey M. Borodin > wrote: > > I think we typically avoid this kind of check failure by assigning > uuidv7() and uuidv7(interval) different C functions that call the > common function. That is, we have pg

Re: Count and log pages set all-frozen by vacuum

2024-10-31 Thread Melanie Plageman
On Thu, Oct 31, 2024 at 11:56 AM Alastair Turner wrote: > > For user consumption, to reduce the number of puzzled questions, I'd suggest > adding a line to the log output of the form > > visibility map: %u pages set all frozen, up to %u may have been removed from > the table > > rather than appe

Re: Time to add a Git .mailmap?

2024-10-31 Thread Nathan Bossart
On Thu, Oct 31, 2024 at 11:37:13AM +0100, Daniel Gustafsson wrote: > When looking at our Git tree for a recent conference presentation I happened > to > notice that we have recently gained duplicate names in the shortlog. Not sure > if we care enough to fix that with a .mailmap, but if we do the

Re: make all ereport in gram.y print out relative location

2024-10-31 Thread Tom Lane
jian he writes: > now changed to > static PartitionStrategy parsePartitionStrategy(char *strategy, int location, > core_yyscan_t yyscanner); I can take a look at this, since it's basically a followup to 774171c4f. regards, tom lane

Re: Count and log pages set all-frozen by vacuum

2024-10-31 Thread Peter Geoghegan
On Thu, Oct 31, 2024 at 10:22 AM Melanie Plageman wrote: > It seems a better solution would be to find a way to document it or > phrase it clearly in the log. It is true that these pages were set > all-frozen in the VM. It is just that some of them were later removed. > And we don't know which one

Re: Consider the number of columns in the sort cost model

2024-10-31 Thread Alena Rybakina
I played around with the examples a bit and couldn't figure out something. When I added the same values ​​to different columns - firstly in a, later in b, the order of the columns for sort operation doesn't change. Isn't this a mistake? create table a (x1 int, y1 int); create table b (x2 int,

Re: Count and log pages set all-frozen by vacuum

2024-10-31 Thread Melanie Plageman
On Thu, Oct 31, 2024 at 11:15 AM Peter Geoghegan wrote: > > On Thu, Oct 31, 2024 at 10:22 AM Melanie Plageman > wrote: > > It seems a better solution would be to find a way to document it or > > phrase it clearly in the log. It is true that these pages were set > > all-frozen in the VM. It is jus

Re: Making error message more user-friendly with spaces in a URI

2024-10-31 Thread Stepan Neretin
> > I made a patch to make the error message more user-friendly when using a > URI to connect a database with psql. > Hi, Yushi! I could not find this line in the master branch and I couldn't apply this patch. I only see this error in the test (I think the test should also be changed), but the id

Re: Having problems generating a code coverage report

2024-10-31 Thread jian he
On Thu, Oct 31, 2024 at 10:02 PM Aleksander Alekseev wrote: > > Hi, > > > On Wed, Oct 30, 2024 at 05:26:49PM -0400, Peter Geoghegan wrote: > > > I use Debian unstable for most of my day to day work. Apparently > > > Debian unstable has exactly the same version of lcov as Ubuntu 24.04. > > > > > >

Multi delete wal IDEA

2024-10-31 Thread Stepan Neretin
Hi there, hackers! How about trying out an idea to add an analog to save memory in WAL files for deleting records, similar to multi-insert optimization? This patch is trying to do just that. Best Regards, Stepan Neretin! diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/no

Re: Count and log pages set all-frozen by vacuum

2024-10-31 Thread Peter Geoghegan
On Thu, Oct 31, 2024 at 11:26 AM Melanie Plageman wrote: > I'm biased because I want the count of pages newly set all-frozen in > the VM for another patch. You think exposing the total number of > all-frozen pages at the end of the vacuum is more useful to users? The emphasis on the work that one

Re: Having problems generating a code coverage report

2024-10-31 Thread Aleksander Alekseev
Hi Jian, > > I downgraded to lcov 1.16 [1] and it helped. This is merely a > > workaround of course, not a long-time solution. > > > > [1]: https://github.com/linux-test-project/lcov/releases/tag/v1.16 > > > > -- > > my ubuntu meson version: 0.61.2, which also fails. > with similar errors you've p

"command cannot affect row a second time" in INSERT ... ON CONFLICT

2024-10-31 Thread Karthik Ramanathan
Hello hackers, I am looking to better understand the applicability of the error message "command cannot affect row a second time". Consider the following table and data: CREATE TABLE ioc (i int, UNIQUE(i)); INSERT INTO ioc VALUES (1); The following two queries produce different errors: *Query 1*

Re: Use "protocol options" name instead of "protocol extensions" everywhere

2024-10-31 Thread Heikki Linnakangas
On 30/10/2024 15:58, Jelte Fennema-Nio wrote: It was pointed out by Heikki in the thread around protocol-level wait-for-LSN that "protocol extensions" is a pretty confusing name, since it suggests a relation to Postgres extensions. Even though there is no such relationship at all. Attached is a s

Re: Count and log pages set all-frozen by vacuum

2024-10-31 Thread Peter Geoghegan
On Thu, Oct 31, 2024 at 12:02 PM Robert Haas wrote: > I don't see it quite the same way. I agree that what users are really > concerned about is the excessive number of unfrozen pages in the VM. > But that's not the question here. The question is what should > log_autovacuum_min_duration log. And

Re: [PoC] Federated Authn/z with OAUTHBEARER

2024-10-31 Thread Jacob Champion
On Thu, Oct 31, 2024 at 4:05 AM Antonin Houska wrote: > > > And regardless, the library appears to be loaded by every backend during > > > authentication. Why isn't it loaded by postmaster like libraries listed > > > in > > > shared_preload_libraries? fork() would then ensure that the backe

[PATCH] Improve code coverage of network address functions

2024-10-31 Thread Aleksander Alekseev
Hi hackers, Recently I played with lcov [1]. In the process it was discovered that the following functions are not executed by our tests: - abbrev(inet) - set_masklen(cidr,int4) - netmask(inet) - hostmask(inet) - inet_client_addr() - inet_client_port() - inet_server_addr() - inet_server_port() T

Re: Relcache refactoring

2024-10-31 Thread Heikki Linnakangas
On 31/10/2024 12:06, Heikki Linnakangas wrote: On 31/10/2024 10:14, Heikki Linnakangas wrote: Committed with those fixes, thanks for the review! There is a failure in the buildfarm animal 'prion', which builds with -DRELCACHE_FORCE_RELEASE -DCATCACHE_FORCE_RELEASE options. I'll look into tha

Re: Count and log pages set all-frozen by vacuum

2024-10-31 Thread Robert Haas
On Thu, Oct 31, 2024 at 11:15 AM Peter Geoghegan wrote: > Probably not, but I don't think that it's worth worrying about. ISTM > that it's inevitable that somebody might get confused whenever we > expose implementation details such as these. This particular example > doesn't seem particularly conc

Re: small pg_combinebackup improvements

2024-10-31 Thread Robert Haas
On Thu, Oct 31, 2024 at 11:41 AM Bertrand Drouvot wrote: > 0001 looks pretty straightforward and good to me. Thanks for the review. > What about moving the new comment just before the new "else if"? Well, the block comment applies to the whole if-else if-else construction. If we get too many el

Re: minor doc issue in 9.16.2.1.1. Boolean Predicate Check Expressions

2024-10-31 Thread Bruce Momjian
On Fri, Oct 18, 2024 at 10:00:54AM +0800, jian he wrote: > On Fri, Oct 18, 2024 at 2:05 AM Bruce Momjian wrote: > > Yes, updated patch attached. > > > looks good. > > in the meantime, do you think it's necessary to slightly rephrase > jsonb_path_match doc entry: > > currently doc entry: > jsonb_

Re: small pg_combinebackup improvements

2024-10-31 Thread Bertrand Drouvot
Hi, On Wed, Oct 30, 2024 at 03:50:53PM -0400, Robert Haas wrote: > Hi, > > Here are two small patches to improve pg_combinebackup slightly. > > 0001: I noticed that there is some logic in reconstruct.c that > constructs a pathname of the form a/b//c instead of a/b/c. AFAICT, > this still works f

Re: Count and log pages set all-frozen by vacuum

2024-10-31 Thread Robert Haas
On Thu, Oct 31, 2024 at 11:49 AM Peter Geoghegan wrote: > The emphasis on the work that one particular VACUUM operation > performed doesn't seem like the most relevant thing to users (I get > why you'd care about it in the context of your work, though). What > matters to users is that the overall

Re: Use "protocol options" name instead of "protocol extensions" everywhere

2024-10-31 Thread Robert Haas
On Thu, Oct 31, 2024 at 10:51 AM Heikki Linnakangas wrote: > Bikeshedding time: > > "protocol option" makes me think of GUCs. > > "optional protocol features" perhaps. A bit long though.. > > Or keep using "protocol extension" and add a paragraph to the docs to > say explicitly that there's no sup

Re: Use "protocol options" name instead of "protocol extensions" everywhere

2024-10-31 Thread Jelte Fennema-Nio
On Thu, 31 Oct 2024 at 15:50, Heikki Linnakangas wrote: > Bikeshedding time: Another few options: 4. Protocol enhancement 5. Protocol flag 6. Protocol feature-flag 7. Protocol configuration 8. Protocol parameter One thing to consider is that there's two ways of using them: 1. Turning an optional

Re: Fix typos where 'the' was repeated

2024-10-31 Thread Daniel Gustafsson
> On 31 Oct 2024, at 10:24, vignesh C wrote: > I noticed a couple of typos in code. "the the" should have been "the", > attached patch has the changes for the same. Fixed, thanks. -- Daniel Gustafsson

Re: Eager aggregation, take 3

2024-10-31 Thread jian he
hi. still trying to understand v13. found a bug. minimum test : drop table if exists t1, t2; CREATE TABLE t1 (a int, b int, c int); CREATE TABLE t2 (a int, b int, c int); SET enable_eager_aggregate TO on; explain(costs off, settings) SELECT avg(t2.a), t1.c FROM t1 JOIN t2 ON t1.b = t2.b GROUP BY t

Re: IPC::Run::time[r|out] vs our TAP tests

2024-10-31 Thread Daniel Gustafsson
> On 28 Oct 2024, at 11:56, Heikki Linnakangas wrote: > > On 09/04/2024 20:10, Daniel Gustafsson wrote: >> Turning the timeout into a timer and returning undef along with logging a >> test >> failure in case of expiration seems a bit saner (maybe Andrew can suggest an >> API which has a better P

Re: MultiXact\SLRU buffers configuration

2024-10-31 Thread Andrey M. Borodin
> On 29 Oct 2024, at 21:45, Thom Brown wrote: > > It clearly checks for interrupts, but when I saw this issue happen, it > wasn't interruptible. Perhaps, that was different multixacts? When I was observing this pathology on Standby, it was a stream of different reads encountering different m

Slot's restart_lsn may point to removed WAL segment after hard restart unexpectedly

2024-10-31 Thread Vitaly Davydov
Dear Hackers,   I'd like to discuss a problem with replication slots's restart LSN. Physical slots are saved to disk at the beginning of checkpoint. At the end of checkpoint, old WAL segments are recycled or removed from disk, if they are not kept by slot's restart_lsn values.   If an existing

Re: Relcache refactoring

2024-10-31 Thread Heikki Linnakangas
On 31/10/2024 10:14, Heikki Linnakangas wrote: Committed with those fixes, thanks for the review! There is a failure in the buildfarm animal 'prion', which builds with -DRELCACHE_FORCE_RELEASE -DCATCACHE_FORCE_RELEASE options. I'll look into that later today. (I did test with -DRELCACHE_FORCE

Re: Slot's restart_lsn may point to removed WAL segment after hard restart unexpectedly

2024-10-31 Thread Vitaly Davydov
Sorry, attached the missed patch. On Thursday, October 31, 2024 13:18 MSK, "Vitaly Davydov" wrote: Dear Hackers,   I'd like to discuss a problem with replication slots's restart LSN. Physical slots are saved to disk at the beginning of checkpoint. At the end of checkpoint, old WAL segments a

Re: Wrong result when enable_partitionwise_join is on if collation of PartitionKey and Column is different.

2024-10-31 Thread Amit Langote
On Wed, Oct 30, 2024 at 9:36 PM Junwang Zhao wrote: > On Wed, Oct 30, 2024 at 11:58 AM jian he wrote: > > > > I missed a case when column collation and partition key collation are > > the same and indeterministic. > > that should be fine for partition-wise join. > > so v2 attached. > > > > have_p

Re: Statistics Import and Export

2024-10-31 Thread Corey Huinker
> > > (c) we are considering whether to use an in-place heap update for the > relation stats, so that a large restore doesn't bloat pg_class -- I'd > like feedback on this idea > I'd also like feedback, though I feel very strongly that we should do what ANALYZE does. In an upgrade situation, nea

Re: Count and log pages set all-frozen by vacuum

2024-10-31 Thread Melanie Plageman
Thanks for taking a look, Alastair! On Thu, Oct 31, 2024 at 5:47 AM Alastair Turner wrote: > > The values returned in a case pages are removed (cases where the empty pages > are at the end of the table) are a bit confusing. > > In an example similar to yours, but with a normal vacuum operation,

Re: Test to dump and restore objects left behind by regression

2024-10-31 Thread Tom Lane
Michael Paquier writes: > On my laptop, testing the plain format adds roughly 12s, in a test > that now takes 1m20s to run vs 1m32s. Enabling regress_dump_formats > and adding three more formats counts for 45s of runtime. For a test > that usually shows up as the last one to finish for a heavily

Re: Proper object locking for GRANT/REVOKE

2024-10-31 Thread Bertrand Drouvot
Hi, On Mon, Oct 28, 2024 at 04:20:42PM +0100, Peter Eisentraut wrote: > This patch started out as a refactoring, thinking that objectNamesToOids() > in aclchk.c should really mostly be a loop around get_object_address(). > This is mostly true, with a few special cases because the node > representa

Re: Separate memory contexts for relcache and catcache

2024-10-31 Thread Melih Mutlu
Hi Jeff, Jeff Davis , 30 Eki 2024 Çar, 01:00 tarihinde şunu yazdı: > On Wed, 2024-04-03 at 16:12 +0300, Melih Mutlu wrote: > > Rebased. PSA. > > Thank you. I missed your patch and came up with a similar patch over > here: > > > https://www.postgresql.org/message-id/flat/78599c442380ddb5990117e281

Re: Inval reliability, especially for inplace updates

2024-10-31 Thread Alexander Lakhin
Hello Noah, 31.10.2024 04:39, Noah Misch wrote: I had pushed this during the indicated week, before your mail. Reverting it is an option. Let's see if more opinions arrive. I've accidentally discovered an incorrect behaviour caused by commit 4eac5a1fa. Running this script: for ((j=1; j<=100;

Re: Consider the number of columns in the sort cost model

2024-10-31 Thread Alena Rybakina
On 29.10.2024 05:47, Andrei Lepikhov wrote: On 10/28/24 16:48, Alena Rybakina wrote: On 23.10.2024 04:39, Andrei Lepikhov wrote: On 15/10/2024 12:15, David Rowley wrote: And the last patch is a demo of how I'm going to use the previous three patches and add one more strategy to improve the ord

Re: Having problems generating a code coverage report

2024-10-31 Thread Aleksander Alekseev
Hi, > On Wed, Oct 30, 2024 at 05:26:49PM -0400, Peter Geoghegan wrote: > > I use Debian unstable for most of my day to day work. Apparently > > Debian unstable has exactly the same version of lcov as Ubuntu 24.04. > > > > I've also been unable to generate coverage reports for some time (at > > lea

Re: protocol-level wait-for-LSN

2024-10-31 Thread Jelte Fennema-Nio
On Thu, 31 Oct 2024 at 13:59, Jesper Pedersen wrote: > And, it will be confusing to clean-room implementations: When you have > this startup parameter then you get these message formats, when you have > this startup parameter then you get these message formats -- and what > about combinations ? Li

Re: UUID v7

2024-10-31 Thread Andrey M. Borodin
> On 1 Nov 2024, at 03:00, Masahiko Sawada wrote: > > Therefore, if the > system clock moves backward due to NTP, we cannot guarantee > monotonicity and sortability. Is that right? Not exactly. Monotonicity is ensured for a given backend. We make sure that timestamp is advanced at least for

Re: Pgoutput not capturing the generated columns

2024-10-31 Thread Peter Smith
On Thu, Oct 31, 2024 at 3:16 AM vignesh C wrote: > Thanks for committing this patch, here is a rebased version of the > remaining patches. > Hi Vignesh. Here are my review comments for the docs patch v1-0002. == Commit message 1. This patch updates docs to describe the new feature allowin

Re: define pg_structiszero(addr, s, r)

2024-10-31 Thread David Rowley
On Thu, 31 Oct 2024 at 19:17, Michael Paquier wrote: > Seems kind of OK seen from here. I am wondering if others more > comments about the name of the macro, its location, the fact that we > still have pagebytes in bufpage.c, etc. This change looks incorrect: @@ -126,18 +124,9 @@ PageIsVerified

Re: Showing applied extended statistics in explain Part 2

2024-10-31 Thread Tatsuro Yamada
Hi All, I apologize for not being able to continue development due to various circumstances. The attached file is the rebased patch. I will now catch up on the discussion and try to revise the patch. Regards, Tatsuro Yamada On Fri, Jul 19, 2024 at 7:17 PM wrote: > > On 7/18/24 12:37, masahiro

Re: Eager aggregation, take 3

2024-10-31 Thread Richard Guo
On Thu, Oct 31, 2024 at 12:25 AM Robert Haas wrote: > Well, the key thing here is the reasoning, which you don't really > spell out either here or in the patch. The patch's justification for > the use of BTEQUALIMAGE_PROC Is that, if we use non-equal-image > operators, "we may lose some informatio

Re: define pg_structiszero(addr, s, r)

2024-10-31 Thread Michael Paquier
On Fri, Nov 01, 2024 at 05:45:44PM +1300, David Rowley wrote: > I think this should be passing BLCKSZ rather than (BLCKSZ / > sizeof(size_t)), otherwise, it'll just check the first 1 kilobyte is > zero rather than the entire page. Ugh, Friday brain fart. The attached should be able to fix that, t

Re: Eager aggregation, take 3

2024-10-31 Thread Richard Guo
On Thu, Oct 31, 2024 at 9:16 PM jian he wrote: > > hi. > still trying to understand v13. found a bug. > > minimum test : > drop table if exists t1, t2; > CREATE TABLE t1 (a int, b int, c int); > CREATE TABLE t2 (a int, b int, c int); > SET enable_eager_aggregate TO on; > explain(costs off, setting

Re: UUID v7

2024-10-31 Thread Masahiko Sawada
On Thu, Oct 31, 2024 at 9:53 PM Andrey M. Borodin wrote: > > > > > On 1 Nov 2024, at 03:00, Masahiko Sawada wrote: > > > > Therefore, if the > > system clock moves backward due to NTP, we cannot guarantee > > monotonicity and sortability. Is that right? > > Not exactly. Monotonicity is ensured fo

Re: define pg_structiszero(addr, s, r)

2024-10-31 Thread Bertrand Drouvot
Hi, On Fri, Nov 01, 2024 at 05:45:44PM +1300, David Rowley wrote: > On Thu, 31 Oct 2024 at 19:17, Michael Paquier wrote: > > Seems kind of OK seen from here. I am wondering if others more > > comments about the name of the macro, its location, the fact that we > > still have pagebytes in bufpage

RE: Popcount optimization using AVX512

2024-10-31 Thread Devulapalli, Raghuveer
> Here is an updated patch with this change. LGTM. Raghuveer

Re: MultiXact\SLRU buffers configuration

2024-10-31 Thread Thom Brown
On Thu, 31 Oct 2024, 17:33 Andrey M. Borodin, wrote: > > > > On 31 Oct 2024, at 17:29, Thom Brown wrote: > > > > On Thu, 31 Oct 2024 at 10:47, Andrey M. Borodin > wrote: > >> > >> > >> > >>> On 29 Oct 2024, at 21:45, Thom Brown wrote: > >>> > >>> It clearly checks for interrupts, but when I sa

Re: Popcount optimization using AVX512

2024-10-31 Thread Nathan Bossart
On Wed, Oct 30, 2024 at 04:10:10PM -0500, Nathan Bossart wrote: > On Wed, Oct 30, 2024 at 08:53:10PM +, Raghuveer Devulapalli wrote: >> BTW, I just realized function attributes for xsave and avx512 don't work >> on MSVC (see >> https://developercommunity.visualstudio.com/t/support-function-targ

Re: pg_parse_json() should not leak token copies on failure

2024-10-31 Thread Jacob Champion
On Mon, Oct 7, 2024 at 3:45 PM Jacob Champion wrote: > I've added a 0002 as well. 0002 has since been applied [1] so I'm reattaching v4-0001 to get the cfbot happy again. --Jacob [1] https://git.postgresql.org/cgit/postgresql.git/commit/?id=41b023946d v4-0001-jsonapi-add-lexer-option-to-keep-

Re: pg_upgrade check for invalid databases

2024-10-31 Thread Bruce Momjian
On Fri, Oct 25, 2024 at 01:55:57PM +0200, Daniel Gustafsson wrote: > > On 14 Oct 2024, at 18:57, Bruce Momjian wrote: > > > What might be acceptable would be to add an option that would make > > pg_upgrade more tolerant of problems in many areas, that is a lot more > > research and discussion. >

Re: Time to add a Git .mailmap?

2024-10-31 Thread Michael Paquier
On Thu, Oct 31, 2024 at 02:45:02PM -0500, Nathan Bossart wrote: > On Thu, Oct 31, 2024 at 11:37:13AM +0100, Daniel Gustafsson wrote: >> When looking at our Git tree for a recent conference presentation I happened >> to >> notice that we have recently gained duplicate names in the shortlog. Not >

Re: Making error message more user-friendly with spaces in a URI

2024-10-31 Thread Michael Paquier
On Thu, Oct 31, 2024 at 10:35:41PM +0700, Stepan Neretin wrote: > Hi, Yushi! I could not find this line in the master branch and I couldn't > apply this patch. I only see this error in the test (I think the test > should also be changed), but the idea of fixing the error looks good to me. This lin

Re: libedit history seems to be misbehaving / broken

2024-10-31 Thread Bruce Momjian
On Sun, Oct 27, 2024 at 09:07:44PM +0100, Tomas Vondra wrote: > On 10/27/24 20:03, Tom Lane wrote: > > FWIW, I don't observe any particular misbehavior with the very ancient > > libedit that macOS ships. On Fedora 39, I notice something related to > > what you say: it seems like the "\q" ending a

Re: Inval reliability, especially for inplace updates

2024-10-31 Thread Noah Misch
On Thu, Oct 31, 2024 at 05:00:02PM +0300, Alexander Lakhin wrote: > I've accidentally discovered an incorrect behaviour caused by commit > 4eac5a1fa. Running this script: Thanks. This looks important. > parallel -j40 --linebuffer --tag .../reproi.sh ::: `seq 40` This didn't reproduce it for me,

Re: make all ereport in gram.y print out relative location

2024-10-31 Thread Tom Lane
I wrote: > I can take a look at this, since it's basically a followup > to 774171c4f. Pushed with some cleanup and further hacking. regards, tom lane

Re: IPC::Run::time[r|out] vs our TAP tests

2024-10-31 Thread Heikki Linnakangas
On 31/10/2024 14:27, Daniel Gustafsson wrote: On 28 Oct 2024, at 11:56, Heikki Linnakangas wrote: On 09/04/2024 20:10, Daniel Gustafsson wrote: =item $session->quit Close the session and clean up resources. Each test run must be closed with C. Returns TRUE when the session was cleanly termina

Re: vacuumdb --analyze-only (e.g., after a major upgrade) vs. partitioned tables: pg_statistic missing stats for the partitioned table itself

2024-10-31 Thread Bruce Momjian
On Thu, Oct 24, 2024 at 02:48:42PM -0700, Nikolay Samokhvalov wrote: > [ACg8ocIyQq] > Nikolay Samokhvalov  2:47 PM (0 minutes ago) >[cleardot] > to pglsql-hackers [cleardot] > [cleardot] > I

Re: Wrong result when enable_partitionwise_join is on if collation of PartitionKey and Column is different.

2024-10-31 Thread Tender Wang
Amit Langote 于2024年10月31日周四 21:09写道: > On Wed, Oct 30, 2024 at 9:36 PM Junwang Zhao wrote: > > On Wed, Oct 30, 2024 at 11:58 AM jian he > wrote: > > > > > > I missed a case when column collation and partition key collation are > > > the same and indeterministic. > > > that should be fine for pa

Re: Wrong result when enable_partitionwise_join is on if collation of PartitionKey and Column is different.

2024-10-31 Thread Tender Wang
Amit Langote 于2024年10月31日周四 21:09写道: > > 0001 is the patch for the partitionwise grouping issue (bug #18568). > I concluded that even partial aggregate should be disallowed when the > grouping collation doesn't match partitioning collation. The result > with partial partitionwise grouping is not

Re: UUID v7

2024-10-31 Thread Masahiko Sawada
On Thu, Oct 31, 2024 at 11:46 AM Andrey M. Borodin wrote: > > > > > On 31 Oct 2024, at 22:15, Masahiko Sawada wrote: > > > > On Sat, Oct 26, 2024 at 10:05 AM Andrey M. Borodin > > wrote: > > > > I think we typically avoid this kind of check failure by assigning > > uuidv7() and uuidv7(interval)

Re: Add ExprState hashing for GROUP BY and hashed SubPlans

2024-10-31 Thread David Rowley
On Thu, 31 Oct 2024 at 15:30, Andrei Lepikhov wrote: > Comparing the master with and without your patch, the first, I see is > more extensive usage of memory (see complete explains in the attachment): > > Current master: >Batches: 1 Memory Usage: 74513kB > Patched: >Batches: 261 Memory

Re: In-placre persistance change of a relation

2024-10-31 Thread Heikki Linnakangas
On 31/10/2024 10:01, Kyotaro Horiguchi wrote: After some delays, here’s the new version. In this update, UNDO logs are WAL-logged and processed in memory under most conditions. During checkpoints, they’re flushed to files, which are then read when a specific XID’s UNDO log is accessed for the fir

  1   2   >