RE: Conflict detection and logging in logical replication

2024-08-19 Thread Zhijie Hou (Fujitsu)
On Monday, August 19, 2024 2:40 PM Amit Kapila wrote: > > On Mon, Aug 19, 2024 at 11:54 AM shveta malik > wrote: > > > > On Mon, Aug 19, 2024 at 11:37 AM Amit Kapila > wrote: > > > > > > On Mon, Aug 19, 2024 at 9:08 AM shveta malik > wrote: > > > > > > > > On Sun, Aug 18, 2024 at 2:27 PM Zhiji

Re: Conflict detection and logging in logical replication

2024-08-19 Thread shveta malik
On Mon, Aug 19, 2024 at 12:09 PM Amit Kapila wrote: > > On Mon, Aug 19, 2024 at 11:54 AM shveta malik wrote: > > > > On Mon, Aug 19, 2024 at 11:37 AM Amit Kapila > > wrote: > > > > > > On Mon, Aug 19, 2024 at 9:08 AM shveta malik > > > wrote: > > > > > > > > On Sun, Aug 18, 2024 at 2:27 PM Zh

Re: [BUG FIX]: invalid meson version detection

2024-08-19 Thread Heikki Linnakangas
On 14/08/2024 17:02, Sergey Solovev wrote: I looked at meson.build file at found an incorrectly used function to determine postgres version. > if pg_version.endswith('devel') >   pg_version_arr = [pg_version.split('devel')[0], '0'] There should be `pg_version.contains('devel')`, not `end

Re: Pgoutput not capturing the generated columns

2024-08-19 Thread Peter Smith
Hi Shubham, here are my review comments for the TAP tests patch v27-0002 == Commit message Tap tests for 'include-generated-columns' ~ But, it's more than that-- these are the TAP tests for all combinations of replication related to generated columns. i.e. both with and without 'include_gen

Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs

2024-08-19 Thread Jelte Fennema-Nio
On Mon, 19 Aug 2024 at 05:44, Robert Haas wrote: > I feel like what you're really complaining about here is that libpq is > not properly versioned. We've just been calling it libpq.so.5 forever > instead of bumping the version number when we change stuff. There is PQlibVersion() that can be used

Re: MultiXact\SLRU buffers configuration

2024-08-19 Thread Andrey M. Borodin
> On 5 Jul 2024, at 23:18, Andrey M. Borodin wrote: > > Alvaro, please find attached the test. > I’ve addressed some Michael’s comments in a nearby thread: removed extra > load, made injection point names lowercase, fixed some grammar issues. I’ve made several runs on Github to test stabilit

debug_palloc_context_threshold - dump code paths leading to memory leaks

2024-08-19 Thread Jakub Wartak
Hi -hackers, >From time to time we hit some memory leaks in PostgreSQL and on one occasion Tomas wrote: "I certainly agree it's annoying that when OOM hits, we end up with no information about what used the memory. Maybe we could have a threshold triggering a call to MemoryContextStats?" - see [1]

[Bug Fix]standby may crash when switching-over in certain special cases

2024-08-19 Thread px shi
Hi, hackers, I've recently encountered an issue where a standby crashes when reconnecting to a new primary after a switchover under certain conditions. Here's a procedure of the crash scenario: 1) We have three instances: one primary and two standbys (s1 and s2, both using streaming replication)

Re: Asymmetric partition-wise JOIN

2024-08-19 Thread Andrei Lepikhov
On 1/8/2024 20:56, Alexander Korotkov wrote: On Tue, Apr 2, 2024 at 6:07 AM Andrei Lepikhov wrote: Actually, the idea I tried to express is the combination of #1 and #2: to build individual plan for every partition, but consider the 'Common Resources'. Let me explain this a bit more. Thanks fo

Re: Drop database command will raise "wrong tuple length" if pg_database tuple contains toast attribute.

2024-08-19 Thread Yugo Nagata
On Mon, 19 Aug 2024 00:35:39 +0200 Tomas Vondra wrote: > On 8/16/24 13:26, Tomas Vondra wrote: > > Hi Ayush, > > > > ... > > > > So this fix seems reasonable. > > > > I've pushed this to all affected branches, except for 11 which is EOL. > > I thought about adding a test, but I couldn't thin

Re: gitmaster server problem?

2024-08-19 Thread Jelte Fennema-Nio
On Sat, 17 Aug 2024 at 22:05, Joe Conway wrote: > Just to close this out -- problem found and fixed about an hour ago. > Sorry for the interruption. Whatever the problem was it seems to have returned

Re: Apply PGDLLIMPORT markings to some GUC variables

2024-08-19 Thread Peter Eisentraut
On 19.08.24 08:18, Michael Paquier wrote: On Tue, Aug 13, 2024 at 03:00:00PM -0400, Robert Haas wrote: This seems correct to me. It is not the first time that this happens in recent history. Would it be worth automating that? I would guess a TAP test that takes a copy of the headers, applies

Re: Vacuum statistics

2024-08-19 Thread jian he
in pg_stats_vacuum if (type == PGSTAT_EXTVAC_INDEX || type == PGSTAT_EXTVAC_HEAP) { Oidrelid = PG_GETARG_OID(1); /* Load table statistics for specified database. */ if (OidIsValid(relid)) { tabentry = fetch_dbstat_tabentry(dbi

Re: Conflict detection and logging in logical replication

2024-08-19 Thread shveta malik
On Mon, Aug 19, 2024 at 12:32 PM Zhijie Hou (Fujitsu) wrote: > > > Thanks for reporting the bug. I have fixed it and ran pgindent in V17 patch. > I also adjusted few comments and fixed a typo. > Thanks for the patch. Re-tested it, all scenarios seem to work well now. I see that this version has

Remove redundant NULL check in clause_selectivity_ext() function

2024-08-19 Thread Ilia Evdokimov
Hi everyone, In the `clause_selectivity_ext()` function, there’s a comment regarding a NULL clause check that asks, "can this still happen?". I decided to investigate whether this scenario is still valid. Here’s what I found after reviewing the relevant cases: - approx_tuple_count(): The fu

Re: thread-safety: gmtime_r(), localtime_r()

2024-08-19 Thread Peter Eisentraut
On 16.08.24 23:01, Thomas Munro wrote: On Sat, Aug 17, 2024 at 3:43 AM Peter Eisentraut wrote: I moved the _POSIX_C_SOURCE definition for MinGW from the header file to a command-line option (-D_POSIX_C_SOURCE). This matches the treatment of _GNU_SOURCE and similar. I was trying to figure out

Re: Drop database command will raise "wrong tuple length" if pg_database tuple contains toast attribute.

2024-08-19 Thread Tomas Vondra
On 8/19/24 11:01, Yugo Nagata wrote: > On Mon, 19 Aug 2024 00:35:39 +0200 > Tomas Vondra wrote: > >> On 8/16/24 13:26, Tomas Vondra wrote: >>> Hi Ayush, >>> >>> ... >>> >>> So this fix seems reasonable. >>> >> >> I've pushed this to all affected branches, except for 11 which is EOL. >> >> I thoug

Re: define PG_REPLSLOT_DIR

2024-08-19 Thread Ashutosh Bapat
On Wed, Aug 14, 2024 at 5:02 PM Bertrand Drouvot wrote: > > Hi hackers, > > while working on a replication slot tool (idea is to put it in contrib, not > shared yet), I realized that "pg_replslot" is being used > 25 times in > .c files. > > I think it would make sense to replace those occurrences

Re: Conflict detection and logging in logical replication

2024-08-19 Thread Amit Kapila
On Mon, Aug 19, 2024 at 3:03 PM shveta malik wrote: > > On Mon, Aug 19, 2024 at 12:32 PM Zhijie Hou (Fujitsu) > wrote: > > > > > > Thanks for reporting the bug. I have fixed it and ran pgindent in V17 patch. > > I also adjusted few comments and fixed a typo. > > > > Thanks for the patch. Re-teste

Re: [PROPOSAL] : Disallow use of empty column name in (column_name '') in ALTER or CREATE of foreign table.

2024-08-19 Thread Ashutosh Bapat
On Fri, Aug 16, 2024 at 8:26 PM Tom Lane wrote: > > Nishant Sharma writes: > > Actual column names used while creation of foreign table are not allowed to > > be an > > empty string, but when we use column_name as an empty string in OPTIONS > > during > > CREATE or ALTER of foreign tables, it is

Re: Use read streams in pg_visibility

2024-08-19 Thread Nazir Bilal Yavuz
Hi, On Mon, 19 Aug 2024 at 09:30, Michael Paquier wrote: > > On Tue, Aug 13, 2024 at 03:22:27PM +0300, Nazir Bilal Yavuz wrote: > > Hi, > > > > I am working on using the read stream in pg_visibility. There are two > > places to use it: > > > > 1- collect_visibility_data() > > > > This one is stra

Re: possible issue in postgres_fdw batching

2024-08-19 Thread Tomas Vondra
On 8/19/24 01:40, Tom Lane wrote: > Tomas Vondra writes: >> Consider this simplified example: > >> CREATE TABLE t (a INT); >> CREATE FOREIGN TABLE f (a INT) SERVER loopback >> OPTIONS (table_name 't'); >> CREATE FUNCTION counter() RETURNS int LANGUAGE sql AS

Re: gitmaster server problem?

2024-08-19 Thread Joe Conway
On 8/19/24 05:04, Jelte Fennema-Nio wrote: On Sat, 17 Aug 2024 at 22:05, Joe Conway wrote: Just to close this out -- problem found and fixed about an hour ago. Sorry for the interruption. Whatever the problem was it seems to have returned What specifically? I am not seeing anything at the

Re: Avoiding superfluous buffer locking during nbtree backwards scans

2024-08-19 Thread Matthias van de Meent
On Sun, 11 Aug 2024 at 21:44, Peter Geoghegan wrote: > > On Tue, Aug 6, 2024 at 6:31 PM Matthias van de Meent > wrote: > > +1, LGTM. > > > > This changes the backward scan code in _bt_readpage to have an > > approximately equivalent handling as the forward scan case for > > end-of-scan cases, whi

Re: gitmaster server problem?

2024-08-19 Thread Jelte Fennema-Nio
On Mon, 19 Aug 2024 at 13:39, Joe Conway wrote: > What specifically? I am not seeing anything at the moment. It seems to be working again fine. But before https://git.postgresql.org was throwing 502 and 503 errors. Depending on the request either by Varnish or nginx.

Re: why is pg_upgrade's regression run so slow?

2024-08-19 Thread Alexander Lakhin
Hello Andrew, 29.07.2024 13:54, Andrew Dunstan wrote: On 2024-07-29 Mo 4:00 AM, Alexander Lakhin wrote: And another interesting fact is that TEMP_CONFIG is apparently ignored by `meson test regress/regress`. For example, with temp.config containing invalid settings, `meson test pg_upgrade/002

Re: Drop database command will raise "wrong tuple length" if pg_database tuple contains toast attribute.

2024-08-19 Thread Tomas Vondra
On 8/19/24 12:16, Tomas Vondra wrote: > On 8/19/24 11:01, Yugo Nagata wrote: > > ... > >> By the way, I found a comment in vac_update_datfrozenxid() and >> EventTriggerOnLogin() >> that explains why we could not use tuples from the syscache for >> heap_inplace_update. >> I think it is better a

Re: gitmaster server problem?

2024-08-19 Thread Robert Haas
On Mon, Aug 19, 2024 at 7:57 AM Jelte Fennema-Nio wrote: > On Mon, 19 Aug 2024 at 13:39, Joe Conway wrote: > > What specifically? I am not seeing anything at the moment. > > It seems to be working again fine. But before > https://git.postgresql.org was throwing 502 and 503 errors. Depending > on

Re: gitmaster server problem?

2024-08-19 Thread Jelte Fennema-Nio
On Mon, 19 Aug 2024 at 14:04, Robert Haas wrote: > I'm still unable to access any https://git.postgresql.org/ URL. Yeah it's broken for me again too.

Re: gitmaster server problem?

2024-08-19 Thread Jelte Fennema-Nio
On Mon, 19 Aug 2024 at 14:05, Jelte Fennema-Nio wrote: > > On Mon, 19 Aug 2024 at 14:04, Robert Haas wrote: > > I'm still unable to access any https://git.postgresql.org/ URL. > > Yeah it's broken for me again too. In case the actual error is helpful (although I doubt it): Error 503 Backend fet

Re: gitmaster server problem?

2024-08-19 Thread Joe Conway
On 8/19/24 08:06, Jelte Fennema-Nio wrote: On Mon, 19 Aug 2024 at 14:05, Jelte Fennema-Nio wrote: On Mon, 19 Aug 2024 at 14:04, Robert Haas wrote: > I'm still unable to access any https://git.postgresql.org/ URL. Yeah it's broken for me again too. In case the actual error is helpful (altho

Re: Opinion poll: Sending an automated email to a thread when it gets added to the commitfest

2024-08-19 Thread Robert Haas
On Fri, Aug 16, 2024 at 3:13 AM Peter Eisentraut wrote: > Yeah, I'd rather not open the can of worms that we send automated emails > to this list at all. +1. > If people want to get emails from > the commitfest app, it should be that you subscribe there and it sends > those emails to those who w

Re: Reducing memory consumed by RestrictInfo list translations in partitionwise join planning

2024-08-19 Thread Ashutosh Bapat
Sorry for the delay in my response. On Wed, May 29, 2024 at 9:34 AM Ashutosh Bapat wrote: > > Documenting some comments from todays' patch review session I forgot to mention back then that both of the suggestions below came from Tom Lane. > 1. Instead of a nested hash table, it might be better

Re: Improve pg_re_throw: check if sigjmp_buf is valid and report error

2024-08-19 Thread Robert Haas
On Mon, Aug 19, 2024 at 2:17 AM Xiaoran Wang wrote: > If the code in PG_TRY contains any non local control flow other than > ereport(ERROR) like goto, break etc., the PG_CATCH or PG_END_TRY cannot > be called, then the PG_exception_stack will point to the memory whose > stack frame has been releas

Re: Opinion poll: Sending an automated email to a thread when it gets added to the commitfest

2024-08-19 Thread Jelte Fennema-Nio
On Fri, 16 Aug 2024 at 16:43, Tom Lane wrote: > However, there are other ways to accomplish that. I liked the > suggestion of extending the CF webapp with a way to search for entries > mentioning a particular mail message ID. I dunno how hard it'd be to > get it to recognize *any* message-ID fro

Re: Reducing memory consumed by RestrictInfo list translations in partitionwise join planning

2024-08-19 Thread Ashutosh Bapat
On Mon, Aug 19, 2024 at 6:43 PM Ashutosh Bapat wrote: > > Sorry for the delay in my response. > > On Wed, May 29, 2024 at 9:34 AM Ashutosh Bapat > wrote: > > > > Documenting some comments from todays' patch review session > > I forgot to mention back then that both of the suggestions below came >

Re: gitmaster server problem?

2024-08-19 Thread Tom Lane
Matthias van de Meent writes: > Additional infra that doesn't seem to work right now: mailing list > archives [0] seem to fail at a 503 produced by Varnish Cache server: > Error 503 Backend fetch failed. Maybe more of infra is down, or > otherwise under maintenance? Yeah, I'm seeing that too; not

Re: gitmaster server problem?

2024-08-19 Thread Bruce Momjian
On Sat, Aug 17, 2024 at 02:15:49PM -0400, Tom Lane wrote: > Matthias van de Meent writes: > > Additional infra that doesn't seem to work right now: mailing list > > archives [0] seem to fail at a 503 produced by Varnish Cache server: > > Error 503 Backend fetch failed. Maybe more of infra is down,

Re: [PATCH] Add get_bytes() and set_bytes() functions

2024-08-19 Thread Aleksander Alekseev
Hi Peter, Thanks for the feedback. > I think these functions do about three things at once, and I don't think > they address the originally requested purpose very well. The amount of things that the function does is a matter of interpretation. I can claim that it does one thing ("extracts an int

Re: define PG_REPLSLOT_DIR

2024-08-19 Thread Bertrand Drouvot
Hi, On Thu, Aug 15, 2024 at 08:40:42PM -0400, Alvaro Herrera wrote: > On 2024-Aug-14, Bertrand Drouvot wrote: > > > Out of curiosity, checking the sizes of affected files (O2, no debug): > > > > with patch: > > > >textdata bss dec hex filename > > 30304 0 8 3

Re: Improve pg_re_throw: check if sigjmp_buf is valid and report error

2024-08-19 Thread Tom Lane
Robert Haas writes: > On Mon, Aug 19, 2024 at 2:17 AM Xiaoran Wang wrote: >> If the code in PG_TRY contains any non local control flow other than >> ereport(ERROR) like goto, break etc., the PG_CATCH or PG_END_TRY cannot >> be called, then the PG_exception_stack will point to the memory whose >>

Re: define PG_REPLSLOT_DIR

2024-08-19 Thread Bertrand Drouvot
Hi, On Fri, Aug 16, 2024 at 01:31:11PM +0900, Yugo Nagata wrote: > On Wed, 14 Aug 2024 11:32:14 + > Bertrand Drouvot wrote: > > Looking forward to your feedback, > > /* restore all slots by iterating over all on-disk entries */ > - replication_dir = AllocateDir("pg_replslot"); > - wh

Re: Opinion poll: Sending an automated email to a thread when it gets added to the commitfest

2024-08-19 Thread Tom Lane
Jelte Fennema-Nio writes: > On Fri, 16 Aug 2024 at 16:43, Tom Lane wrote: >> However, there are other ways to accomplish that. I liked the >> suggestion of extending the CF webapp with a way to search for entries >> mentioning a particular mail message ID. I dunno how hard it'd be to >> get it

Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs

2024-08-19 Thread Robert Haas
On Mon, Aug 19, 2024 at 3:30 AM Jelte Fennema-Nio wrote: > But **now I actually feel much more strongly about reusing the same > function**. Because by introducing a new function we actually break > the users of the second use-case. > > P.S. The docs for PQprotocolVersion[1] have never said that t

Re: define PG_REPLSLOT_DIR

2024-08-19 Thread Bertrand Drouvot
Hi, On Mon, Aug 19, 2024 at 04:11:31PM +0530, Ashutosh Bapat wrote: > On Wed, Aug 14, 2024 at 5:02 PM Bertrand Drouvot > wrote: > > > > Hi hackers, > > > > while working on a replication slot tool (idea is to put it in contrib, not > > shared yet), I realized that "pg_replslot" is being used > 25

Re: gitmaster server problem?

2024-08-19 Thread Bruce Momjian
On Mon, Aug 19, 2024 at 08:11:36AM -0400, Joe Conway wrote: > On 8/19/24 08:06, Jelte Fennema-Nio wrote: > > On Mon, 19 Aug 2024 at 14:05, Jelte Fennema-Nio wrote: > > > > > > On Mon, 19 Aug 2024 at 14:04, Robert Haas wrote: > > > > I'm still unable to access any https://git.postgresql.org/ URL.

Re: gitmaster server problem?

2024-08-19 Thread jian he
On Mon, Aug 19, 2024 at 9:56 PM Bruce Momjian wrote: > as of now. cgit working https://git.postgresql.org/cgit/postgresql.git/ git not working ( 403 Forbidden nginx) https://git.postgresql.org/git/postgresql.git/

Re: gitmaster server problem?

2024-08-19 Thread Dave Page
On Mon, 19 Aug 2024 at 14:56, Bruce Momjian wrote: > On Sat, Aug 17, 2024 at 02:15:49PM -0400, Tom Lane wrote: > > Matthias van de Meent writes: > > > Additional infra that doesn't seem to work right now: mailing list > > > archives [0] seem to fail at a 503 produced by Varnish Cache server: > >

Re: gitmaster server problem?

2024-08-19 Thread Magnus Hagander
On Mon, Aug 19, 2024 at 3:56 PM Tom Lane wrote: > Matthias van de Meent writes: > > Additional infra that doesn't seem to work right now: mailing list > > archives [0] seem to fail at a 503 produced by Varnish Cache server: > > Error 503 Backend fetch failed. Maybe more of infra is down, or > >

Re: gitmaster server problem?

2024-08-19 Thread Tom Lane
Magnus Hagander writes: > On Mon, Aug 19, 2024 at 3:56 PM Tom Lane wrote: >> Yeah, I'm seeing that too; not at the top level of the site but >> when you try to drill down to individual messages. >> commitfest.postgresql.org isn't responding either, >> nor wiki.postgresql.org. > Are you still see

Re: Restart pg_usleep when interrupted

2024-08-19 Thread Bertrand Drouvot
Hi, On Thu, Aug 15, 2024 at 04:13:29PM -0500, Nathan Bossart wrote: > On Wed, Aug 14, 2024 at 06:00:06AM +, Bertrand Drouvot wrote: > > I gave it more thoughts and I don't think we have to choose between the two. > > The 1 Hz approach reduces the number of interrupts and Sami's patch > > prov

Re: gitmaster server problem?

2024-08-19 Thread Dave Page
On Mon, 19 Aug 2024 at 15:27, jian he wrote: > On Mon, Aug 19, 2024 at 9:56 PM Bruce Momjian wrote: > > > > as of now. > cgit working > https://git.postgresql.org/cgit/postgresql.git/ Yes. > > > > git not working > ( 403 Forbidden nginx) > https://git.postgresql.org/git/postgresql.git/ >Fr

Re: gitmaster server problem?

2024-08-19 Thread Dave Page
On Mon, 19 Aug 2024 at 15:29, Tom Lane wrote: > Magnus Hagander writes: > > On Mon, Aug 19, 2024 at 3:56 PM Tom Lane wrote: > >> Yeah, I'm seeing that too; not at the top level of the site but > >> when you try to drill down to individual messages. > >> commitfest.postgresql.org isn't respondin

Re: gitmaster server problem?

2024-08-19 Thread Magnus Hagander
On Mon, Aug 19, 2024 at 4:28 PM Dave Page wrote: > > > On Mon, 19 Aug 2024 at 14:56, Bruce Momjian wrote: > >> On Sat, Aug 17, 2024 at 02:15:49PM -0400, Tom Lane wrote: >> > Matthias van de Meent writes: >> > > Additional infra that doesn't seem to work right now: mailing list >> > > archives [

Re: gitmaster server problem?

2024-08-19 Thread Adrian Klaver
On 8/19/24 07:27, Tom Lane wrote: Magnus Hagander writes: Right at the moment, https://git.postgresql.org/gitweb/?p=postgresql.git is failing for me with "Backend fetch failed". However, the mail I just tried it and it worked. archives, commitfest.p.o, and wiki.p.o seem to be respondin

Test 041_checkpoint_at_promote.pl faild in installcheck due to missing injection_points

2024-08-19 Thread Maxim Orlov
Hi! After rebasing one of my old patches, I'm hit to a problem with the installcheck test for 041_checkpoint_at_promote.pl. At first, I thought it was something wrong with my patch, although it doesn't relate to this part of the Postgres. Then I decided to do the same run but on current master and

Re: Remove redundant NULL check in clause_selectivity_ext() function

2024-08-19 Thread Tom Lane
Ilia Evdokimov writes: > In the `clause_selectivity_ext()` function, there’s a comment regarding > a NULL clause check that asks, "can this still happen?". I decided to > investigate whether this scenario is still valid. > Here’s what I found after reviewing the relevant cases: > - approx_tupl

Re: Report search_path value back to the client.

2024-08-19 Thread Tomas Vondra
On 8/14/24 18:30, Jelte Fennema-Nio wrote: > On Wed, 14 Aug 2024 at 18:22, Tomas Vondra wrote: >> Here's the patch with a somewhat expanded / improved commit message. >> Jelte, can you take a look there's no silly mistake? > > Looks good to me. Pushed, after rewording the commit message a bit.

Re: Avoid orphaned objects dependencies, take 3

2024-08-19 Thread Bertrand Drouvot
Hi, On Wed, Jul 10, 2024 at 07:31:06AM +, Bertrand Drouvot wrote: > So, to sum up: > > A. Locking is now done exclusively with LockNotPinnedObject(Oid classid, Oid > objid) > so that it's now always clear what object we want to acquire a lock for. It > means > we are not manipulating direct

Re: Remove redundant NULL check in clause_selectivity_ext() function

2024-08-19 Thread Ilia Evdokimov
On 19.8.24 18:02, Tom Lane wrote: Ilia Evdokimov writes: In the `clause_selectivity_ext()` function, there’s a comment regarding a NULL clause check that asks, "can this still happen?". I decided to investigate whether this scenario is still valid. Here’s what I found after reviewing the relev

Re: Report search_path value back to the client.

2024-08-19 Thread Tom Lane
Tomas Vondra writes: > On 8/14/24 18:30, Jelte Fennema-Nio wrote: >> Looks good to me. > Pushed, after rewording the commit message a bit. This patch does not appear to have updated any of the relevant documentation. regards, tom lane

Re: Add support for (Var op Var) clause in extended MCV statistics

2024-08-19 Thread Ilia Evdokimov
On 12.8.24 19:25, Tomas Vondra wrote: Is TPC-B really interesting/useful for this patch? The queries are super simple, with only a single clause (so it may not even get to the code handling extended statistics). Did you create any extended stats? No, it's not the case. I simply wanted to verif

Re: Test 041_checkpoint_at_promote.pl faild in installcheck due to missing injection_points

2024-08-19 Thread Tom Lane
Maxim Orlov writes: > After rebasing one of my old patches, I'm hit to a problem with the > installcheck test for 041_checkpoint_at_promote.pl. src/test/recovery/README points out that Also, to use "make installcheck", you must have built and installed contrib/pg_prewarm, contrib/pg_stat_sta

Re: Report search_path value back to the client.

2024-08-19 Thread Tomas Vondra
On 8/19/24 18:02, Tom Lane wrote: > Tomas Vondra writes: >> On 8/14/24 18:30, Jelte Fennema-Nio wrote: >>> Looks good to me. > >> Pushed, after rewording the commit message a bit. > > This patch does not appear to have updated any of the relevant > documentation. > Oh, I haven't realized we ex

Re: Report search_path value back to the client.

2024-08-19 Thread Tom Lane
Tomas Vondra writes: > I see there are two places in libpq.sgml and protocol.sgml that should > list search_path - will fix. I haven't found any other place in the docs > that would need an update, or did I miss something? I recall there being two places, so that's probably the extent of it ... y

Re: Vacuum statistics

2024-08-19 Thread Ilia Evdokimov
Are you certain that all tables are included in `pg_stat_vacuum_tables`? I'm asking because of the following: SELECT count(*) FROM pg_stat_all_tables ;  count ---    108 (1 row) SELECT count(*) FROM pg_stat_vacuum_tables ;  count ---     20 (1 row) -- Regards, Ilia Evdokimov, Tantor L

Re: generic plans and "initial" pruning

2024-08-19 Thread Robert Haas
On Fri, Aug 16, 2024 at 8:36 AM Amit Langote wrote: > So it is possible for the executor to try to run a plan that has > become invalid since it was created, so... I'm not sure what the "so what" here is. > One perhaps crazy idea [1]: > > What if we remove AcquireExecutorLocks() and move the res

Re: generic plans and "initial" pruning

2024-08-19 Thread Tom Lane
Robert Haas writes: > On Fri, Aug 16, 2024 at 8:36 AM Amit Langote wrote: >> So it is possible for the executor to try to run a plan that has >> become invalid since it was created, so... > I'm not sure what the "so what" here is. The fact that there are holes in our protections against that do

Re: generic plans and "initial" pruning

2024-08-19 Thread Robert Haas
On Mon, Aug 19, 2024 at 12:54 PM Tom Lane wrote: > What the examples here are showing is that AcquireExecutorLocks > is incomplete because it only provides defenses against DDL > initiated by other sessions, not by our own session. We have > CheckTableNotInUse but I'm not sure if it could be appl

Re: generic plans and "initial" pruning

2024-08-19 Thread Tom Lane
Robert Haas writes: > But that seems somewhat incidental to what this thread is about. Perhaps. But if we're running into issues related to that, it might be good to set aside the long-term goal for a bit and come up with a cleaner answer for intra-session locking. That could allow the pruning

Re: Report search_path value back to the client.

2024-08-19 Thread Tomas Vondra
On 8/19/24 18:19, Tom Lane wrote: > Tomas Vondra writes: >> I see there are two places in libpq.sgml and protocol.sgml that should >> list search_path - will fix. I haven't found any other place in the docs >> that would need an update, or did I miss something? > > I recall there being two places

Re: Report search_path value back to the client.

2024-08-19 Thread Tom Lane
Tomas Vondra writes: > On 8/19/24 18:19, Tom Lane wrote: >> I recall there being two places, so that's probably the extent of it >> ... yeah, the last similar patch was d16f8c8e4, and that's what >> it did. > Thanks, updated in a similar way. LGTM, thanks. regards, tom l

Re: generic plans and "initial" pruning

2024-08-19 Thread Robert Haas
On Mon, Aug 19, 2024 at 1:52 PM Tom Lane wrote: > Robert Haas writes: > > But that seems somewhat incidental to what this thread is about. > > Perhaps. But if we're running into issues related to that, it might > be good to set aside the long-term goal for a bit and come up with > a cleaner answ

Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs

2024-08-19 Thread Jelte Fennema-Nio
On Mon, 19 Aug 2024 at 16:16, Robert Haas wrote: > If somebody is using PQprotocolVersion() to detect the arrival of a > new protocol version, it stands to reason that they only care about > new major protocol versions, because that's what the function is > defined to tell you about. Anyone who ha

Re: Incremental View Maintenance, take 2

2024-08-19 Thread Kirill Reshke
On Tue, 30 Jul 2024 at 10:24, Yugo NAGATA wrote: > > Hi, > > On Tue, 30 Jul 2024 03:32:19 +0500 > Kirill Reshke wrote: > > > On Sat, 27 Jul 2024 at 13:26, Kirill Reshke wrote: > > > > > > Hi! > > > Cloudberry DB (Greenplum fork) uses IMMV feature for AQUMV (auto query > > > use matview) feature,

Re: Thread-safe nl_langinfo() and localeconv()

2024-08-19 Thread Thomas Munro
On Tue, Aug 13, 2024 at 5:45 PM Thomas Munro wrote: > Over on the discussion thread about remaining setlocale() work[1], I > wrote out some long boring theories about $SUBJECT. Just as an FYI/curiosity, I converted my frustrations with localeconv() into a request[1] that POSIX consider standardis

Re: Detailed release notes

2024-08-19 Thread Bruce Momjian
On Fri, Jul 26, 2024 at 10:11:22AM -0400, Tom Lane wrote: > Daniel Gustafsson writes: > >> On 26 Jul 2024, at 15:00, Marcos Pegoraro wrote: > >> But why is that just a hidden comment and not a visible link for us ? > > > That's likely the wrong level of detail for the overwhelming majority of >

Re: Cross-version Compatibility of postgres_fdw

2024-08-19 Thread Bruce Momjian
On Wed, Aug 14, 2024 at 03:25:48AM +0900, Etsuro Fujita wrote: > On Tue, Aug 13, 2024 at 12:15 PM Fujii Masao > wrote: > > On 2024/08/09 17:49, Etsuro Fujita wrote: > > > I just thought consolidating the information to one place would make > > > the documentation more readable. > > > > Yes, so I t

Re: on_error table, saving error info to a table

2024-08-19 Thread jian he
On Mon, Jul 15, 2024 at 1:42 PM Nishant Sharma wrote: > > Thanks for the patch! > > I was not able to understand why we need a special error table for COPY? > Can't we just log it in a new log error file for COPY in a proper format? Like > using table approach, PG would be unnecessarily be utilisi

Re: PG docs - Sequence CYCLE clause

2024-08-19 Thread Bruce Momjian
On Wed, Aug 14, 2024 at 01:46:23PM +0200, Peter Eisentraut wrote: > On 13.08.24 07:46, Peter Smith wrote: > > While reviewing another thread I had cause to be looking more > > carefully at the SEQUENCE documentation. > > > > I found it curious that, unlike other clauses, the syntax of the CYCLE >

Re: Speed up Hash Join by teaching ExprState about hashing

2024-08-19 Thread David Rowley
On Mon, 19 Aug 2024 at 18:41, David Rowley wrote: > The attached v5 patch includes this change. I made a few more tweaks to the comments and pushed the result. Thank you both of you for having a look at this. David

Re: [BUG] Fix DETACH with FK pointing to a partitioned table fails

2024-08-19 Thread Tender Wang
Alvaro Herrera 于2024年8月8日周四 06:50写道: > On 2024-Jul-26, Tender Wang wrote: > > > Junwang Zhao 于2024年7月26日周五 14:57写道: > > > > > There is a bug report[0] Tender comments might be the same issue as > > > this one, but I tried Alvaro's and mine patch, neither could solve > > > that problem, I did not

Re: Logical Replication of sequences

2024-08-19 Thread Peter Smith
Hi Vignesh, Here are my review comments for the latest patchset v20240819-0001. No changes. No comments. v20240819-0002. No changes. No comments. v20240819-0003. See below. v20240819-0004. See below. v20240819-0005. No changes. No comments. /// PATCH v20240819-0003 == sr

Re: [BUG] Fix DETACH with FK pointing to a partitioned table fails

2024-08-19 Thread Alvaro Herrera
On 2024-Aug-20, Tender Wang wrote: > > As I understand, this fix needs to be applied all the way back to 12, > > because the overall functionality is that old. However, in branches 14 > > and back, the patch doesn't apply cleanly, because of the changes we > > made in commit f4566345cf40 :-( I'm

Re: [BUG] Fix DETACH with FK pointing to a partitioned table fails

2024-08-19 Thread Tender Wang
Alvaro Herrera 于2024年8月20日周二 10:25写道: > On 2024-Aug-20, Tender Wang wrote: > > > > As I understand, this fix needs to be applied all the way back to 12, > > > because the overall functionality is that old. However, in branches 14 > > > and back, the patch doesn't apply cleanly, because of the ch

Re: CREATE SUBSCRIPTION - add missing test case

2024-08-19 Thread Peter Smith
On Fri, Aug 16, 2024 at 2:15 PM vignesh C wrote: > Thanks for the review. > > I agree currently there is no test to hit this code. I'm not sure if > this is the correct location for the test, should it be included in > the 008_diff_schema.pl file? Yes, that is a better home for this test. Done

Re: PG docs - Sequence CYCLE clause

2024-08-19 Thread Peter Smith
On Tue, Aug 20, 2024 at 10:18 AM Bruce Momjian wrote: > > Great, patch applied to master. > Thanks for pushing! == Kind Regards, Peter Smith. Fujitsu Australia

Re: documentation structure

2024-08-19 Thread jian he
On Mon, Jul 22, 2024 at 10:42 AM jian he wrote: > hi. this time everything should be ok! step1. python3 split_func_sgml.py step2. git apply v6-0001-all-filelist-for-directory-doc-src-sgml-func.patch (step2, cannot use "git am"). what v7_split_func_sgml.py did: 1. The new file only has 2 occur

Re: Improve pg_re_throw: check if sigjmp_buf is valid and report error

2024-08-19 Thread Xiaoran Wang
Tom Lane 于2024年8月19日周一 22:12写道: > Robert Haas writes: > > On Mon, Aug 19, 2024 at 2:17 AM Xiaoran Wang > wrote: > >> If the code in PG_TRY contains any non local control flow other than > >> ereport(ERROR) like goto, break etc., the PG_CATCH or PG_END_TRY cannot > >> be called, then the PG_exce

Re: documentation structure

2024-08-19 Thread jian he
On Tue, Aug 20, 2024 at 11:18 AM jian he wrote: > > On Mon, Jul 22, 2024 at 10:42 AM jian he wrote: > > > hi. this time everything should be ok! > > > step1. python3 split_func_sgml.py > step2. git apply > v6-0001-all-filelist-for-directory-doc-src-sgml-func.patch (step2, > cannot use "git am").

Re: Improve pg_re_throw: check if sigjmp_buf is valid and report error

2024-08-19 Thread Xiaoran Wang
Xiaoran Wang 于2024年8月20日周二 11:32写道: > > > Tom Lane 于2024年8月19日周一 22:12写道: > >> Robert Haas writes: >> > On Mon, Aug 19, 2024 at 2:17 AM Xiaoran Wang >> wrote: >> >> If the code in PG_TRY contains any non local control flow other than >> >> ereport(ERROR) like goto, break etc., the PG_CATCH or

Re: Improve pg_re_throw: check if sigjmp_buf is valid and report error

2024-08-19 Thread Tom Lane
Xiaoran Wang writes: >> Yeah, that's the big problem. I don't have any confidence at all >> that this would detect misuse. It'd require that the old stack >> frame gets overwritten, which might not happen for a long time, >> and it'd require that somebody eventually do a longjmp, which again >>

Re: define PG_REPLSLOT_DIR

2024-08-19 Thread Ashutosh Bapat
On Mon, Aug 19, 2024 at 7:47 PM Bertrand Drouvot wrote: > > Hi, > > On Mon, Aug 19, 2024 at 04:11:31PM +0530, Ashutosh Bapat wrote: > > On Wed, Aug 14, 2024 at 5:02 PM Bertrand Drouvot > > wrote: > > > > > > Hi hackers, > > > > > > while working on a replication slot tool (idea is to put it in co

Re: Conflict detection and logging in logical replication

2024-08-19 Thread Amit Kapila
On Mon, Aug 19, 2024 at 4:16 PM Amit Kapila wrote: > > > Rest looks good. > > > > Thanks for the review and testing. > Pushed. -- With Regards, Amit Kapila.

Remaining reference to _PG_fini() in ldap_password_func

2024-08-19 Thread Michael Paquier
Hi all, While hacking on a different thing, I've noticed that ldap_password_func had the idea to define _PG_fini(). This is pointless, as library unloading is not supported in the backend, and something that has been cleaned up from the tree in ab02d702ef08. That's not something to encourage, per

Re: CI cpluspluscheck failures

2024-08-19 Thread Amul Sul
On Mon, Aug 19, 2024 at 1:30 AM Thomas Munro wrote: > > On Mon, Aug 19, 2024 at 12:10 AM Thomas Munro wrote: > > I'm not sure why the first one started happening at the commit > > (aa2d6b15) that caused the second one, I feel like I'm missing > > something... Thanks, Thomas, for addressing the m

Re: define PG_REPLSLOT_DIR

2024-08-19 Thread Bertrand Drouvot
Hi, On Tue, Aug 20, 2024 at 09:26:59AM +0530, Ashutosh Bapat wrote: > On Mon, Aug 19, 2024 at 7:47 PM Bertrand Drouvot > wrote: > > > > Hi, > > > > On Mon, Aug 19, 2024 at 04:11:31PM +0530, Ashutosh Bapat wrote: > > > On Wed, Aug 14, 2024 at 5:02 PM Bertrand Drouvot > > > wrote: > > > > > > > >

Re: define PG_REPLSLOT_DIR

2024-08-19 Thread Ashutosh Bapat
On Tue, Aug 20, 2024 at 10:49 AM Bertrand Drouvot wrote: > > Hi, > > On Tue, Aug 20, 2024 at 09:26:59AM +0530, Ashutosh Bapat wrote: > > On Mon, Aug 19, 2024 at 7:47 PM Bertrand Drouvot > > wrote: > > > > > > Hi, > > > > > > On Mon, Aug 19, 2024 at 04:11:31PM +0530, Ashutosh Bapat wrote: > > > >

ANALYZE ONLY

2024-08-19 Thread Michael Harris
Hello Postgres Hackers An application that I am developing uses Postgresql, and includes a fairly large number of partitioned tables which are used to store time series data. The tables are partitioned by time, and typically there is only one partition at a time - the current partition - that is

Re: [bug fix] prepared transaction might be lost when max_prepared_transactions is zero on the subscriber

2024-08-19 Thread Amit Kapila
On Wed, Aug 14, 2024 at 10:26 AM shveta malik wrote: > > > > > Thanks for the detailed analysis. I agree with your analysis that we > > need to reset the origin information for the shutdown path to avoid it > > being advanced incorrectly. However, the patch doesn't have sufficient > > comments to

  1   2   >