Re: Delay Memoize hashtable build until executor run

2024-01-29 Thread David Rowley
On Tue, 30 Jan 2024 at 12:25, David Rowley wrote: > I'll push this change to master only as there don't seem to have been > any complaints. We can reconsider that if someone complains. Pushed. David

Re: When extended query protocol ends?

2024-01-29 Thread Tom Lane
Tatsuo Ishii writes: > Below is outputs from "pgproto" command coming with Pgpool-II. > (Lines starting "FE" represents a message from frontend to backend. > Lines starting "BE" represents a message from backend to frontend.) > FE=> Parse(stmt="", query="SET extra_float_digits = 3") > FE=> Bind(s

Re: Refactoring backend fork+exec code

2024-01-29 Thread Heikki Linnakangas
On 29/01/2024 17:54, reid.thomp...@crunchydata.com wrote: On Thu, 2024-01-25 at 01:51 +0200, Heikki Linnakangas wrote: And here we go. BackendID is now a 1-based index directly into the PGPROC array. Would it be worthwhile to also note in this comment FIRST_AUX_PROC's and IsAuxProcess()'s dep

Re: UUID v7

2024-01-29 Thread Sergey Prokhorenko
Andrey, I understand and agree with your goals. But instead of dangerous universal  functions, it is better to develop safe highly specialized functions that implement only these goals. There should not be a function uuidv7(T) from an arbitrary timestamp, but there should be a special function t

Re: Use of backup_label not noted in log

2024-01-29 Thread Michael Paquier
On Mon, Jan 29, 2024 at 10:03:19AM -0400, David Steele wrote: > I took a pass at this on PG14 and things definitely look a lot different > back there. Not only is the timeline missing, but there are two sections of > code for ending a backup, one for standby backup and one for primary. Unfortunate

Question on LWLockMode in dsa.c

2024-01-29 Thread Masahiko Sawada
Hi, While working on radix tree patch[1], John Naylor found that dsa.c doesn't already use shared locks even in dsa_dump(). dsa_dump() seems a pure read-only function so I thought we could use a shared lock mode there. Is there any reason to use exclusive mode even in dsa_dump()? Ultimately, sinc

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

2024-01-29 Thread Masahiko Sawada
On Mon, Jan 29, 2024 at 8:48 PM John Naylor wrote: > > On Mon, Jan 29, 2024 at 2:29 PM Masahiko Sawada wrote: > > > > > +/* > > > > + * Calculate the slab blocksize so that we can allocate at least 32 > > > > chunks > > > > + * from the block. > > > > + */ > > > > +#define RT_SLAB_BLOCK_SIZE(siz

Re: When extended query protocol ends?

2024-01-29 Thread Tatsuo Ishii
Hello Dave, > Tatsuo Ishii writes: >> Below is outputs from "pgproto" command coming with Pgpool-II. >> (Lines starting "FE" represents a message from frontend to backend. >> Lines starting "BE" represents a message from backend to frontend.) > >> FE=> Parse(stmt="", query="SET extra_float_digit

Re: Confine vacuum skip logic to lazy_scan_skip

2024-01-29 Thread Melanie Plageman
On Fri, Jan 26, 2024 at 8:28 AM vignesh C wrote: > > CFBot shows that the patch does not apply anymore as in [1]: > === applying patch > ./v3-0002-Add-lazy_scan_skip-unskippable-state-to-LVRelStat.patch > patching file src/backend/access/heap/vacuumlazy.c > ... > Hunk #10 FAILED at 1042. > Hunk #1

RE: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-01-29 Thread Zhijie Hou (Fujitsu)
On Monday, January 29, 2024 9:22 PM vignesh C wrote: > > On Fri, 26 Jan 2024 at 11:30, Alexander Lakhin wrote: > > > > Hello hackers, > > > > After determining a possible cause for intermittent failures of the > > test subscription/031_column_list [1], I was wondering what makes > > another subs

Re: Synchronizing slots from primary to standby

2024-01-29 Thread Peter Smith
Here are some review comments for v72-0001 == doc/src/sgml/ref/alter_subscription.sgml 1. + parameter value of the subscription. Otherwise, the slot on the + publisher may behave differently from what subscription's + failover + option says. The slot on the publisher could

Re: speed up a logical replica setup

2024-01-29 Thread Euler Taveira
On Sun, Jan 28, 2024, at 10:10 PM, Euler Taveira wrote: > On Fri, Jan 26, 2024, at 4:55 AM, Hayato Kuroda (Fujitsu) wrote: >> Again, thanks for updating the patch! There are my random comments for v9. > > Thanks for checking v9. I already incorporated some of the points below into > the next patch

Re: Make COPY format extendable: Extract COPY TO format implementations

2024-01-29 Thread Masahiko Sawada
On Mon, Jan 29, 2024 at 6:45 PM Sutou Kouhei wrote: > > Hi, > > In > "Re: Make COPY format extendable: Extract COPY TO format implementations" > on Mon, 29 Jan 2024 11:37:07 +0800, > Junwang Zhao wrote: > > >> > > Does it make sense to pass only non-builtin options to the custom > >> > > fo

Re: Support run-time partition pruning for hash join

2024-01-29 Thread Richard Guo
On Sat, Jan 27, 2024 at 11:29 AM vignesh C wrote: > CFBot shows that the patch does not apply anymore as in [1]: > > Please post an updated version for the same. Attached is an updated patch. Nothing else has changed. Thanks Richard v6-0001-Support-run-time-partition-pruning-for-hash-join.p

Re: Opportunistically pruning page before update

2024-01-29 Thread James Coleman
On Fri, Jan 26, 2024 at 8:33 PM James Coleman wrote: > > On Tue, Jan 23, 2024 at 2:46 AM Dilip Kumar wrote: > > > > On Tue, Jan 23, 2024 at 7:18 AM James Coleman wrote: > > > > > > On Mon, Jan 22, 2024 at 8:21 PM James Coleman wrote: > > > > > > > > See rebased patch attached. > > > > > > I jus

Re: subscription disable_on_error not working after ALTER SUBSCRIPTION set bad conninfo

2024-01-29 Thread Peter Smith
On Fri, Jan 19, 2024 at 7:21 PM Masahiko Sawada wrote: > > On Thu, Jan 18, 2024 at 6:54 PM Amit Kapila wrote: > > > > On Thu, Jan 18, 2024 at 11:15 AM Peter Smith wrote: > > > > > > On Thu, Jan 18, 2024 at 12:55 PM Masahiko Sawada > > > wrote: > > > > > > > ... > > > > > > > > Although we can

Re: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-01-29 Thread vignesh C
On Tue, 30 Jan 2024 at 07:24, Zhijie Hou (Fujitsu) wrote: > > On Monday, January 29, 2024 9:22 PM vignesh C wrote: > > > > On Fri, 26 Jan 2024 at 11:30, Alexander Lakhin wrote: > > > > > > Hello hackers, > > > > > > After determining a possible cause for intermittent failures of the > > > test s

Re: cfbot is failing all tests on FreeBSD/Meson builds

2024-01-29 Thread Tom Lane
Thomas Munro writes: > On Sat, Jan 13, 2024 at 1:51 PM Tom Lane wrote: >> Time for a bug report to IO::Tty's authors, I guess. > Ahh, there is one: https://github.com/cpan-authors/IO-Tty/issues/38 Just for the archives' sake: I hit this today on a fresh install of FreeBSD 14.0, which has pulled

Re: Synchronizing slots from primary to standby

2024-01-29 Thread Amit Kapila
On Tue, Jan 30, 2024 at 7:29 AM Peter Smith wrote: > > Here are some review comments for v72-0001 > > == > doc/src/sgml/ref/alter_subscription.sgml > > 1. > + parameter value of the subscription. Otherwise, the slot on the > + publisher may behave differently from what subscription's

Re: pg_column_toast_chunk_id: a function to get a chunk ID of a TOASTed value

2024-01-29 Thread jian he
On Fri, Jan 26, 2024 at 8:42 AM Yugo NAGATA wrote: > > On Tue, 2 Jan 2024 08:00:00 +0800 > jian he wrote: > > > On Mon, Nov 6, 2023 at 8:00 AM jian he wrote: > > > > > > minor doc issues. > > > Returns the chunk id of the TOASTed value, or NULL if the value is not > > > TOASTed. > > > Should it

Re: pg_column_toast_chunk_id: a function to get a chunk ID of a TOASTed value

2024-01-29 Thread Yugo NAGATA
On Tue, 30 Jan 2024 12:12:31 +0800 jian he wrote: > On Fri, Jan 26, 2024 at 8:42 AM Yugo NAGATA wrote: > > > > On Tue, 2 Jan 2024 08:00:00 +0800 > > jian he wrote: > > > > > On Mon, Nov 6, 2023 at 8:00 AM jian he > > > wrote: > > > > > > > > minor doc issues. > > > > Returns the chunk id of t

Re: proposal: psql: show current user in prompt

2024-01-29 Thread Pavel Stehule
po 29. 1. 2024 v 10:26 odesílatel Pavel Stehule napsal: > > > ne 28. 1. 2024 v 22:52 odesílatel Jelte Fennema-Nio > napsal: > >> On Sun, 28 Jan 2024 at 20:01, Pavel Stehule >> wrote: >> > There is another reason - compatibility with other drivers. We >> maintain just libpq, but there are JDBC,

Re: Memory consumed by child SpecialJoinInfo in partitionwise join planning

2024-01-29 Thread Ashutosh Bapat
On Fri, Jan 26, 2024 at 8:42 PM vignesh C wrote: > > On Wed, 4 Oct 2023 at 04:02, Ashutosh Bapat > wrote: > > > > On Fri, Sep 29, 2023 at 8:36 AM Amit Langote > > wrote: > > > IOW, something > > > like the following would have sufficed: .. snip... > > > > Works for me. PFA patchset with these c

Re: Make COPY format extendable: Extract COPY TO format implementations

2024-01-29 Thread Sutou Kouhei
Hi, In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Tue, 30 Jan 2024 11:11:59 +0900, Masahiko Sawada wrote: > --- > +if (!format_specified) > +/* Set the default format. */ > +ProcessCopyOptionFormatTo(pstate, opts_out

Re: pg_column_toast_chunk_id: a function to get a chunk ID of a TOASTed value

2024-01-29 Thread jian he
On Tue, Jan 30, 2024 at 12:35 PM Yugo NAGATA wrote: > > > Sorry, I also attached a wrong file. > Attached is the correct one. I think you attached the wrong file again. also please name it as v4.

Re: pg_column_toast_chunk_id: a function to get a chunk ID of a TOASTed value

2024-01-29 Thread Yugo NAGATA
On Tue, 30 Jan 2024 13:47:45 +0800 jian he wrote: > On Tue, Jan 30, 2024 at 12:35 PM Yugo NAGATA wrote: > > > > > > Sorry, I also attached a wrong file. > > Attached is the correct one. > I think you attached the wrong file again. also please name it as v4. Opps..sorry, again. I attached the co

Re: Synchronizing slots from primary to standby

2024-01-29 Thread Amit Kapila
On Mon, Jan 29, 2024 at 6:47 PM Zhijie Hou (Fujitsu) wrote: > > On Monday, January 29, 2024 7:30 PM Amit Kapila > wrote: > > > > > === > > 1. > > parse_subscription_options() > > { > > ... > > /* > > * We've been explicitly asked to not connect, that requires some > > * additiona

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

2024-01-29 Thread Ashutosh Bapat
On Sat, Jan 27, 2024 at 8:26 AM vignesh C wrote: > > On Tue, 31 Oct 2023 at 10:48, Ashutosh Bapat > wrote: > > > > On Thu, Sep 14, 2023 at 4:39 PM Ashutosh Bapat > > wrote: > > > > > > The patch set is thus > > > 0001 - patch used to measure memory used during planning > > > > > > 0002 - Patch t

Re: tablecmds.c/MergeAttributes() cleanup

2024-01-29 Thread Ashutosh Bapat
Hi Alexander, On Sun, Jan 28, 2024 at 1:30 PM Alexander Lakhin wrote: > > Hello Peter, > > 26.01.2024 16:42, Peter Eisentraut wrote: > > > > I have committed all this. These are great improvements. > > > > Please look at the segmentation fault triggered by the following query since > 4d969b2f8:

Re: Transaction timeout

2024-01-29 Thread Andrey M. Borodin
> On 26 Jan 2024, at 19:58, Japin Li wrote: > > Thanks for updating the patch. Here are some comments for v24. > > + > +Terminate any session that spans longer than the specified amount of > +time in transaction. The limit applies both to explicit transactions > +

Re: Report planning memory in EXPLAIN ANALYZE

2024-01-29 Thread Ashutosh Bapat
On Mon, Jan 29, 2024 at 10:43 PM Alvaro Herrera wrote: > > Okay, so I gave this another look and concluded that I definitely didn't > like the whole business of having one level open the explain group and > return outwards whether it had been done so that the other level would > close it. So I ma

Re: Support "Right Semi Join" plan shapes

2024-01-29 Thread Alena Rybakina
Hi! Thank you for your work on this subject. I have reviewed your patch and I think it is better to add an Assert for JOIN_RIGHT_SEMI to the ExecMergeJoin and ExecNestLoop functions to prevent the use of RIGHT_SEMI for these types of connections (NestedLoop and MergeJoin). Mostly I'm suggestin

Re: UUID v7

2024-01-29 Thread Andrey M. Borodin
> On 30 Jan 2024, at 01:38, Jelte Fennema-Nio wrote: > > Yeah, I liked the feature to generate UUIDv7 based on timestamp too. > But following the spec seems more important than a nice feature to me. PFA v15. Changes: removed timestamp argument, incorporated Jelte’s documentation addons. Than

Re: Returning non-terminated string in ECPG Informix-compatible function

2024-01-29 Thread Ashutosh Bapat
On Mon, Jan 29, 2024 at 2:17 PM wrote: > > Greetings, everyone! > > While analyzing output of Svace static analyzer [1] I've found a bug. > > In function intoasc(interval * i, char *str) from file > src/interfaces/ecpg/compatlib/informix.c > we return a non-terminated string since we use memcpy on

Re: Incorrect cost for MergeAppend

2024-01-29 Thread Ashutosh Bapat
On Mon, Jan 29, 2024 at 6:11 PM Alexander Kuzmenkov wrote: > > Hello hackers, > > While investigating some query plans, I noticed some code that seems > to be wrong: when create_merge_append_path() estimates the cost of > sorting an input, it calls cost_sort() passing subpath->parent->tuples > as

Re: Make COPY format extendable: Extract COPY TO format implementations

2024-01-29 Thread Michael Paquier
On Tue, Jan 30, 2024 at 02:45:31PM +0900, Sutou Kouhei wrote: > In > "Re: Make COPY format extendable: Extract COPY TO format implementations" > on Tue, 30 Jan 2024 11:11:59 +0900, > Masahiko Sawada wrote: > >> --- >> +if (!format_specified) >> +/* Set the default fo

Re: UUID v7

2024-01-29 Thread Sergey Prokhorenko
Andrey, I think this phrase is outdated: "This function can optionally accept a timestamp used instead of current time.This allows implementation of k-way sotable identifiers." This phrase is wrong: "Both functions return a version 4 (random) UUID." For this phrase the reason is unclear and the

Re: Question on LWLockMode in dsa.c

2024-01-29 Thread Bharath Rupireddy
On Tue, Jan 30, 2024 at 6:24 AM Masahiko Sawada wrote: > > Hi, > > While working on radix tree patch[1], John Naylor found that dsa.c > doesn't already use shared locks even in dsa_dump(). dsa_dump() seems > a pure read-only function so I thought we could use a shared lock mode > there. Is there a

Re: Inconsistency in reporting checkpointer stats

2024-01-29 Thread Michael Paquier
On Sat, Jan 20, 2024 at 08:10:03AM +0530, vignesh C wrote: > The patch does not apply anymore, please post a rebased version of the patch : There is more to it. Some of the columns of pg_stat_bgwriter have been moved to a different view, aka pg_stat_checkpointer. I have marked the patch as retur

<    1   2