On Tue, Feb 04, 2025 at 03:00:49PM +0100, Tomas Vondra wrote:
I'm late to this party. I have apps that do start queries like this a
lot. These apps fall into this type:
> Or maybe the fact table is "users" and the dimensions have all kinds of
> info about the user (address, primary e-mail addre
On Sat, Nov 15, 2025 at 01:41:04AM +0100, Tomas Vondra wrote:
> > And then there is the problem of detecting when this happens.
> >
> > I think my big question is, when we join A->B->C->D, we do a lot of work
> > in the optimizer to figure out what order to use, but when we do A->B,
> > A->C, A->D
On Sat, Nov 15, 2025 at 1:05 AM David Geier wrote:
> I understand that you want to make progress with the use case at hand
> but I feel like we're missing out on a lot of opportunity where the
> introduced code would also be very beneficial.
The patch is independently beneficial, but is also just
On 11/14/25 22:07, Bruce Momjian wrote:
> On Wed, Nov 12, 2025 at 04:39:50PM +0100, Tomas Vondra wrote:
>> Hi,
>>
>> Here's a v5, addressing some (but not all) of the things discussed
>> earlier in this thread.
>>
>> This does nothing about the "opposite" type of join, with many small
>> tables lin
Thanks for starting this thread! This is a very useful
feature that users will find beneficial to easily narrow
down the reason the xmin horizon is being held back,
and take action.
Adding this information to the vacuum logging is useful, but
I can see this information being exposed in a view as w
On Wed, 2025-11-12 at 19:59 +0100, Peter Eisentraut wrote:
> I'm getting a bit confused by all these different variant function
> names.
One way of looking at it is that the functions in this patch series
mostly affect how identifiers are treated, whereas earlier collation-
related work affects
Hi,
Our assertion quality is lower on Visual Studio. I assumed there was
nothing stopping us from writing a pg_expr_has_type_p() macro using
pure standard C and C++ these days, and the attached patch seemed to
work on GCC, Clang and Visual Studio 2022 (via CI, no Windows here).
Unfortunately our
On 11/14/25 19:20, David Geier wrote:
> Hi Tomas!
>
> On 13.11.2025 23:36, Tomas Vondra wrote:
>> ...
>>
>> Unfortunately, I don't think this patch is the way to go. When I apply
>> it, I get:
>>
>>ERROR: InstrEndLoop called on running node
>>CONTEXT: parallel worker
>>
>
> Ooops. That
> On 14 Nov 2025, at 16:20, Andrew Dunstan wrote:
> OTOH, if you want to skip a lot of ok's in the regress_log file, you can do
> something like:
>
> fail("$line missing initial # in postgresql.conf.sample") if $line =~
> /^\s*[^#\s]/;
Went ahead with a change along this line to keep the test
On Fri, Nov 14, 2025 at 2:39 AM Amit Kapila wrote:
>
> On Fri, Nov 14, 2025 at 11:40 AM Masahiko Sawada
> wrote:
> >
> > On Thu, Nov 13, 2025 at 7:16 PM shveta malik wrote:
> > >
> > > On Thu, Nov 13, 2025 at 6:39 PM Alexander Kukushkin
> > > wrote:
> > > >
> > > >
> > > >
> > > >> But the sy
On Fri, Nov 14, 2025 at 6:18 PM Chao Li wrote:
> As you added a semi-colon in the line, the one after the empty line can be
> deleted, though C allows empty statement, but unnecessary, and may lead to
> confusion for code readers.
> You missed to replace this pgac_cv__static_assert with the new
On Fri, Nov 14, 2025 at 03:10:32PM +, Mircea Cadariu wrote:
> What's interesting about the holdable cursors scenario is that as far as I
> can tell the temp files are cleaned up during PersistHoldablePortal instead
> of PortalDrop.
As part of the ExecutorEnd() done in this case. Right, it loo
Hi Ashutosh,
> If there is one method that is better than all others, community will
> be more willing to accept implementation of that one method than
> multiple implementations so as to reduce maintenance burden.
Ok then. I'll leave "COPY FROM STDIN BINARY" implementation out of 3 only.
Would y
On Fri, Nov 14, 2025 at 04:34:08PM -0500, Tom Lane wrote:
> Works for me. Do we need any special .gitattributes for the file
> at all, if we're relying on the TAP test to catch this?
We'd at least need -whitespace (I think), but I figured we might as well
highlight beginning-of-line tabs and trai
Nathan Bossart writes:
> I don't see a way in .gitattributes to check for _any_ tabs in a file, just
> for beginning-of-line indentation with tabs. But it's easy enough to add a
> check in the TAP test.
Works for me. Do we need any special .gitattributes for the file
at all, if we're relying on
On Fri, Nov 14, 2025 at 03:25:15PM -0500, Tom Lane wrote:
> I seem to recall a proposal that the best fix is to not use tabs
> at all in postgresql.conf.sample. That seems like a good way out
> to me. I think we could fix .gitattributes so that "git diff --check"
> would verify no tabs, but I've
On Fri, Nov 14, 2025 at 10:34 PM Viktor Holmberg wrote:
>
> Here are some updates that needed to be done after the improvements to the
> RLS docs / tests in 7dc4fa & 2e8424.
>
hi.
I see this:
https://commitfest.postgresql.org/patch/6109/
already mentioned all the related discussion links.
Could
Peter Eisentraut writes:
> On 12.11.25 19:02, Tom Lane wrote:
>> Hm, I've had "re-sync TZ code with upstream" on my TODO list for
>> several years now. I believe there's been quite a bit of churn
>> upstream since tzcode2020d, some of it oriented towards this same
>> issue of code modernization.
On Wed, Nov 12, 2025 at 04:39:50PM +0100, Tomas Vondra wrote:
> Hi,
>
> Here's a v5, addressing some (but not all) of the things discussed
> earlier in this thread.
>
> This does nothing about the "opposite" type of join, with many small
> tables linking to a single "central" table. I'm not convi
Sami Imseih writes:
> While looking at something nearby, I noticed that BackendXidGetPid()
> uses an "int" for "pid", where it should be used "pid_t" like in other
> places in the code including in procarray.c.
I don't think this is an amazingly good idea, considering that the
value it's returnin
Hi,
While looking at something nearby, I noticed that BackendXidGetPid()
uses an "int" for "pid", where it should be used "pid_t" like in other
places in the code including in procarray.c.
Here is a small patch to fix this.
Thanks,
--
Sami Imseih
Amazon Web Services (AWS)
0001-Change-Backend
Nathan Bossart writes:
> I noticed that GitHub is using 4-space tabs for this file [0], presumably
> due to this [1] recent change. I'm not aware of an official policy for
> this file, but it seems to be written for 8-space tabs.
> One way to fix this is to set our default tab width to 8 in
> .g
I noticed that GitHub is using 4-space tabs for this file [0], presumably
due to this [1] recent change. I'm not aware of an official policy for
this file, but it seems to be written for 8-space tabs.
One way to fix this is to set our default tab width to 8 in
.gitattributes/.editorconfig (see at
On Fri, Nov 14, 2025 at 01:01:08PM -0600, Nathan Bossart wrote:
> Since it's my bug, I'll go ahead and apply the fix.
Committed.
--
nathan
Hello PostgreSQL developers,I’ve encountered a bug in the incremental backup feature that prevents restoration of backups containing relations larger than 1 GB that were vacuum-truncated.Problem DescriptionWhen taking incremental backups of relations that span multiple segments, if the relation is
I wrote:
> I wonder if the "&& !defined(__aarch64__)" bit needs to be removed.
No, that idea is off-track. Looking at the following code, the
HWCAP2_CRC32 flag is only relevant on ARM32, so we don't need to
worry about obtaining a definition for it on aarch64 (and we'd likely
not find one anyway)
On Fri, Nov 14, 2025 at 08:57:46AM -0600, Nathan Bossart wrote:
> That's my bad. +1 for fixing and back-patching.
Since it's my bug, I'll go ahead and apply the fix. I'll leave the new
test to you, though (unless you'd rather me take that, too).
--
nathan
Hi Tomas!
On 13.11.2025 23:36, Tomas Vondra wrote:
> Sorry for not responding to this thread earlier.
No worries. Thanks for looking at it!
IMHO if this requires adding another macro to a bunch of ad hoc places
is rather inconvenient. It'd be much better to fix this in a localized
On Wed, Nov 12, 2025 at 12:39 PM Tomas Vondra wrote:
> I think I generally agree with what you said here about the challenges,
> although it's a bit too abstract to respond to individual parts. I just
> don't know how to rework the design to resolve this ...
I'm trying to identify which subsets o
Hi John!
On 13.11.2025 05:01, John Naylor wrote:
> If that's the case then I suggest first seeing if dfd8e6c73ee made
> things any worse. A simpler possible improvement is to use a similar
> normalization step for the chars, if needed, then do the sort and
> quinique with a specialization for unsi
Hi Ilia!
On 13.10.2025 12:08, Ilia Evdokimov wrote:
>
> On 17.09.2025 12:40, Ilia Evdokimov wrote:
>> Hi David,
>>
>> In v2 patch, when the join is reversed we pass the commutator operator
>> Oid to eqjoinsel_semi(), and inside that function we immediately call
>> get_opcode(). Did you mean for t
varsup.c has the following comment:
/*
* We'll start complaining loudly when we get within 40M transactions of
* data loss. This is kind of arbitrary, but if you let your gas gauge
* get down to 2% of full, would you be looking for the next gas
station?
Hi,
On Fri, Nov 14, 2025 at 11:47:35PM +0800, jian he wrote:
> hi.
>
> if PartitionKeyData->partattrs is 0, then it means that partition key is
> expression, else it's column reference.
>
> we can change from
> if (key->partattrs[i] == 0)
> to
yes, I think that makes sense to not compare an Att
On Thu, Nov 13, 2025, at 08:13, Joel Jacobson wrote:
> Attached, please find a new version rebased on top of the bug fix
> patches that just got committed in 0bdc777, 797e9ea, 8eeb4a0, and
> 1b46990.
To help reviewers, here is a new write-up of the patch:
PROBLEM
===
The current implementati
On 11/13/25 23:36, Tomas Vondra wrote:
> ...
>
> What I think we should do is much simpler - make the threshold in shm_mq
> dynamic, start with a very low value and gradually ramp up (up to 1/4).
> So we'd have
>
>if (mqh->mqh_consume_pending > threshold)
>
> We might start with
>
> thres
hi.
if PartitionKeyData->partattrs is 0, then it means that partition key is
expression, else it's column reference.
we can change from
if (key->partattrs[i] == 0)
to
if (key->partattrs[i] == InvalidAttrNumber)
the reason I can think of is to improve grepability.
numeric value 0 is too common to
On Wed, 12 Nov 2025 at 16:00, Heikki Linnakangas wrote:
>
> I added an
> inlined fast path to SlruReadSwitchPage and SlruWriteSwitchPage to
> eliminate the function call overhead of those in the common case that no
> page switch is needed. With that, the 100 million mxid test case I used
> went f
On 2025-Nov-14, Andrew Dunstan wrote:
> OTOH, if you want to skip a lot of ok's in the regress_log file, you can do
> something like:
>
> fail("$line missing initial # in postgresql.conf.sample") if $line =~
> /^\s*[^#\s]/;
Yeah, I'm pretty confident we don't want one "ok" per correct line in
th
On 2025-11-14 Fr 9:06 AM, Daniel Gustafsson wrote:
When looking at the nearby suggestion to add deprecation comment for md5 in the
.conf.sample, I happened to notice that autovacuum_worker_slots isn't commented
out it the sample file.
AFAIK all GUCs in the sample file should be set to their def
Hi Michael,
I think I found a gap in the tests we added previously for documenting
the current behaviour. See attached patch for your consideration.
What's interesting about the holdable cursors scenario is that as far as
I can tell the temp files are cleaned up during PersistHoldablePortal
On Fri, Nov 14, 2025 at 01:57:28PM +0100, Daniel Gustafsson wrote:
> Something like that yes. I'll wait for others to chime in but unless there
> are
> objections I think we should go with something like this.
Seems fine to me. I'd like to start emitting WARNINGs in ~v20 when folks
log in using
John Naylor writes:
> We already have the following, so I'm not sure what you mean (or even
> what architecture you're running on):
> #if defined(HAVE_ELF_AUX_INFO) || defined(HAVE_GETAUXVAL)
> #include
> #if defined(__linux__) && !defined(__aarch64__) && !defined(HWCAP2_CRC32)
> #include
> #en
On Fri, Nov 14, 2025 at 09:44:42AM -0500, Tom Lane wrote:
> Daniel Gustafsson writes:
>> When looking at the nearby suggestion to add deprecation comment for md5 in
>> the
>> .conf.sample, I happened to notice that autovacuum_worker_slots isn't
>> commented
>> out it the sample file.
>
>> AFAIK
On Fri, Nov 14, 2025 at 09:44:42AM -0500, Tom Lane wrote:
> Daniel Gustafsson writes:
> > When looking at the nearby suggestion to add deprecation comment for md5 in
> > the
> > .conf.sample, I happened to notice that autovacuum_worker_slots isn't
> > commented
> > out it the sample file.
>
> >
Daniel Gustafsson writes:
> When looking at the nearby suggestion to add deprecation comment for md5 in
> the
> .conf.sample, I happened to notice that autovacuum_worker_slots isn't
> commented
> out it the sample file.
> AFAIK all GUCs in the sample file should be set to their defaults and lef
On Fri, Nov 14, 2025 at 1:52 AM Chao Li wrote:
> > On Nov 11, 2025, at 23:34, Álvaro Herrera wrote:
> >
> > On 2025-Jun-18, David G. Johnston wrote:
> >
> >> Version 8.
> >>
> >> Marking this Ready to Commit in CF 2025-09 (CF PG19-1)
> >
> > I have rebased this; here's v9. I haven't reviewed it
When looking at the nearby suggestion to add deprecation comment for md5 in the
.conf.sample, I happened to notice that autovacuum_worker_slots isn't commented
out it the sample file.
AFAIK all GUCs in the sample file should be set to their defaults and left
commented out. The attached does that
On Wed, Nov 12, 2025 at 4:00 PM Chao Li wrote:
> Hi Hackers,
>
> While working on the other patch [1] that touched tbm_add_tuples() under
> src/backend/nodes, I moved a loop variable into for statement by the way as
> I knew Peter Eisentraut had done some efforts about that, see [2].
>
> However,
On Fri, Jul 4, 2025 at 8:16 PM Ashutosh Bapat
wrote:
>
> On Wed, Jul 2, 2025 at 1:46 PM Zhijie Hou (Fujitsu)
> wrote:
>
> >
> > I'm concerned about whether we can correctly display replica identity in the
> > view for partitioned tables.
> >
> > In the case of partitioned tables, we display only
I can reproduce the bug on the master branch with the following steps:
1. Apply 0001-XXX-Dirty-hack-to-clobber-control-file-for-testing.patch [1]
2. Compile PostgreSQL with `-DEXEC_BACKEND` C compiler flag option.
3. Run `initdb`
4. Run `postgres`
5. Run `pgbench -i`
6. Run `psql -c 'do $$ begin l
> On 14 Nov 2025, at 13:15, Michael Banck wrote:
> On Fri, Nov 14, 2025 at 12:53:41PM +0100, Daniel Gustafsson wrote:
>>> On 14 Nov 2025, at 11:47, Michael Banck wrote:
>>> while looking through postgresql.conf on PG18, I noticed that
>>> password_encryption mentions md5 as valid alternative to
Re: Tomas Vondra
> So I'm leaning to adjust pg_numa_init() to also check EPERM, per the
> attached patch. It still calls numa_available(), so that we don't
> silently miss future libnuma changes.
>
> Can you check this makes it work inside the docker container?
Yes your patch works. (Sorry I mean
Hi,
On Fri, Nov 14, 2025 at 12:53:41PM +0100, Daniel Gustafsson wrote:
> > On 14 Nov 2025, at 11:47, Michael Banck wrote:
> > while looking through postgresql.conf on PG18, I noticed that
> > password_encryption mentions md5 as valid alternative to scram-sha-256.
> > I think it would be useful to
Hi Ivan!
Thanks for the review.
> On 24 Oct 2025, at 19:33, Ivan Bykov wrote:
>
> I believe that we should provide more comprehensible feedback to developers
> by interrupting the deadlock state with a psql timeout. 15 seconds seems safe
> enough to distinguish between slow node operation and
> On 14 Nov 2025, at 11:47, Michael Banck wrote:
> while looking through postgresql.conf on PG18, I noticed that
> password_encryption mentions md5 as valid alternative to scram-sha-256.
> I think it would be useful to mention md5 is deprecated so that people
> looking at it (but have otherwise n
Hi Andres,
> Widening the perspective a bit, our current approach for such
> error-handling /
> shutdown functions seems ... not maintainable. In particular we have a
> substantial number of top-level sigsetjmp() handlers that have slightly
> different recovery codepaths. When adding a new proce
On Fri, Nov 14, 2025 at 3:12 AM Amit Kapila wrote:
>
> On Fri, Nov 14, 2025 at 4:15 PM Masahiko Sawada wrote:
> >
> > On Fri, Nov 14, 2025 at 1:38 AM Amit Kapila wrote:
> > >
> > > On Fri, Nov 14, 2025 at 5:01 AM Masahiko Sawada
> > > wrote:
> > >
> > > I can look at the patch but this inprogr
On Thu, Nov 6, 2025 at 6:50 AM Andrew Kim wrote:
> The v9 patch series is attached.
Thanks! BTW, I've set the commitfest entry to "Needs Review".
I spent some time with the v9-0001 refactoring patch, and I have one
observation that's worth sharing now:
--- a/src/bin/pg_checksums/pg_checksums.c
Hello Hackers,
I’m working on a PostgreSQL extension that defines GUCs and initializes
hooks inside the _PG_init() function,
and I wanted to confirm my understanding of when _PG_init() is called and
whether the library remains loaded
across sessions.
Based on documentation and experimentation, I
On Fri, Nov 14, 2025 at 10:43 AM Peter Smith wrote:
>
> On Fri, Nov 14, 2025 at 2:53 PM Amit Kapila wrote:
> >
> > On Thu, Nov 13, 2025 at 4:46 PM Chao Li wrote:
> > > > On Nov 13, 2025, at 13:17, Peter Smith wrote:
> > > >
> > > > Hi,
> > > >
> > > > While reviewing the recent patches for SEQU
On Fri, Nov 14, 2025 at 4:15 PM Masahiko Sawada wrote:
>
> On Fri, Nov 14, 2025 at 1:38 AM Amit Kapila wrote:
> >
> > On Fri, Nov 14, 2025 at 5:01 AM Masahiko Sawada
> > wrote:
> >
> > I can look at the patch but this inprogress flag is another part which
> > I wanted to avoid if possible again
On 2025-Nov-13, Quan Zongliang wrote:
> A more specific example. Originally, it was impossible to obtain the
> definition of "testdb" by accessing pg_database:
>
> postgres=> SELECT * FROM pg_database WHERE datname='testdb';
> ERROR: permission denied for table pg_database
Hmm. So I was th
On 2025-Nov-12, Peter Eisentraut wrote:
> Well, that's the one, but the code actually looks like this now:
>
> while ((i = bms_next_member(atts, i)) >= 0)
> {
> attcnt++;
> if (attcnt > 1)
> appendStringInfoString(&attsbuf, _(", "));
>
> appendStringIn
On 2023-Apr-13, Karl O. Pinc wrote:
> Dagfinn Ilmari Mannsåker wrote:
> > Another side note: I notice the links don't appear on
> > elements (e.g.
> > https://www.postgresql.org/docs/devel/sql-select.html#SQL-WITH),
> > only .
>
> This we know. Working with elements is a different
> dive int
Hi,
while looking through postgresql.conf on PG18, I noticed that
password_encryption mentions md5 as valid alternative to scram-sha-256.
I think it would be useful to mention md5 is deprecated so that people
looking at it (but have otherwise not gotten the memo) will realize and
hopefully act on
On Fri, Nov 14, 2025 at 1:38 AM Amit Kapila wrote:
>
> On Fri, Nov 14, 2025 at 5:01 AM Masahiko Sawada wrote:
> >
> > On Thu, Nov 13, 2025 at 1:56 AM Amit Kapila wrote:
> > >
> > > On Wed, Nov 12, 2025 at 3:36 PM Masahiko Sawada
> > > wrote:
> > > >
> > > > I've attached the updated version pa
On Fri, Nov 14, 2025 at 11:40 AM Masahiko Sawada wrote:
>
> On Thu, Nov 13, 2025 at 7:16 PM shveta malik wrote:
> >
> > On Thu, Nov 13, 2025 at 6:39 PM Alexander Kukushkin
> > wrote:
> > >
> > >
> > >
> > >> But the system can die/crash before shutdown.
> > >
> > >
> > > You mean it will not wr
On Fri, Nov 14, 2025 at 1:25 AM shveta malik wrote:
>
> In an offline discussion with Kuroda-san, we realized that TRUNCATE
> may hit Assert(XLogLogicalInfoActive()) in ExecuteTruncateGuts() under
> our current implementation, where logical decoding is disabled lazily.
>
> Consider the case where
On Fri, Nov 14, 2025 at 5:01 AM Masahiko Sawada wrote:
>
> On Thu, Nov 13, 2025 at 1:56 AM Amit Kapila wrote:
> >
> > On Wed, Nov 12, 2025 at 3:36 PM Masahiko Sawada
> > wrote:
> > >
> > > I've attached the updated version patch. I addressed all comments I
> > > got so far, and made some cosmet
In an offline discussion with Kuroda-san, we realized that TRUNCATE
may hit Assert(XLogLogicalInfoActive()) in ExecuteTruncateGuts() under
our current implementation, where logical decoding is disabled lazily.
Consider the case where there’s only one logical slot and we attempt
to drop it. The bac
On Fri, Nov 14, 2025 at 4:45 PM Chao Li wrote:
> ```
> + else if (received_sync && res == NULL)
> {
> - /*
> -* PGRES_PIPELINE_SYNC must be followed by another
> -* PGRES_PIPELINE_SYNC or NULL; othe
On Wed, Nov 12, 2025 at 7:42 PM Amit Kapila wrote:
>
> On Thu, Nov 13, 2025 at 4:31 AM Peter Smith wrote:
> >
> > CURRENT
> > seq_sync_error_count
> > sync_error_count
> >
> > MY SUGGESTION
> > sync_seq_error_count
> > sync_table_error_count
> >
>
> +1. Along with consistency with other column na
On Fri, Nov 14, 2025 at 4:50 PM Yugo Nagata wrote:
> I could not reproduce it with the latest REL_16_STABLE branch.
> Perhaps, the assertion failure you mentioned above was the one
> fixed by 1d3ded521?
Yeah, you're right! Thanks for catching that.
I've updated the commit message to explicitly m
On Fri, Nov 14, 2025 at 12:42 AM Alexander Kukushkin
wrote:
>
> Hi Masahiko,
>
> On Fri, 14 Nov 2025 at 07:10, Masahiko Sawada wrote:
>
>>
>> So I think that the
>> reported issue doesn't happen in failover cases and we can focus on
>> failover cases.
>
>
> I think you wanted to say "focus on *sw
Dear Shlok,
Thanks for updating the patch. Few more comments.
> > > > I’m not sure if this has already been discussed; I couldn’t find any
> > > > mention of it in the thread. Why don’t we persist
> > > > 'slot_sync_skip_reason' (it is outside of
> > > > ReplicationSlotPersistentData)? If a slot
Hi Masahiko,
On Fri, 14 Nov 2025 at 07:10, Masahiko Sawada wrote:
> So I think that the
> reported issue doesn't happen in failover cases and we can focus on
> failover cases.
I think you wanted to say "focus on *switchover* cases"?
Regards,
--
Alexander Kukushkin
> On Nov 14, 2025, at 12:10, Chao Li wrote:
>
> 21 - 0008 - ri_triggers.c
> ```
> + quoteOneName(attname,
> + RIAttName(fk_rel, riinfo->fk_attnums[i]));
> ```
>
> This patch uses quoteOneName() a lot. This function simply add double quotes
> without much checks which is unsafe. I think quot
On 12.11.25 19:02, Tom Lane wrote:
Peter Eisentraut writes:
To fix that, I re-downloaded the upstream code (same version as before),
applied the fixes described in src/timezone/README, except those related
to the integer types, and then put back the PostgreSQL-specific code and
massaged things
> On Nov 14, 2025, at 15:47, Fujii Masao wrote:
>
> On Fri, Nov 14, 2025 at 10:23 AM Peter Smith wrote:
>>
>> A rebase was needed. Here is patch v3.
>
> Thanks for the patch! LGTM.
>
> For example, in the CREATE PUBLICATION synopsis, the part that can be
> repeated is "[ ONLY ] table_name
79 matches
Mail list logo