Re: pgsql: Doc: Explain about Column List feature.

2022-12-20 Thread Alvaro Herrera
On 2022-Dec-21, Peter Smith wrote: > By "searching" I also meant just scanning visually, although I was > thinking more about scanning the PDF. > > Right now, the intention of any text box is obvious at a glance > because of those titles like "Caution", "Tip", "Note", "Warning". > Sure, the HTML

Re: [PATCH] random_normal function

2022-12-20 Thread Fabien COELHO
Bonjour Michaël, Overall, I think that there should be a clearer discussion and plan about which random functionS postgres should provide to complement the standard instead of going there… randomly:-) So, what does the specification tells about seeds, normal and random functions? A bunch of

Re: (non) translatable string splicing

2022-12-20 Thread Kyotaro Horiguchi
At Mon, 19 Dec 2022 16:14:04 -0500, Robert Haas wrote in > On Fri, Dec 16, 2022 at 8:25 AM Justin Pryzby wrote: > > Due to incomplete translation, that allows some pretty fancy output, > > like: > > | You must identify the directory where the residen los binarios del > > clúster antiguo. > >

Re: (non) translatable string splicing

2022-12-20 Thread Kyotaro Horiguchi
At Mon, 19 Dec 2022 13:20:55 +0900, Michael Paquier wrote in > On Fri, Dec 16, 2022 at 07:24:52AM -0600, Justin Pryzby wrote: > > Due to incomplete translation, that allows some pretty fancy output, > > like: > > | You must identify the directory where the residen los binarios del > > clúster

Re: Force streaming every change in logical decoding

2022-12-20 Thread Masahiko Sawada
On Tue, Dec 20, 2022 at 7:49 PM Amit Kapila wrote: > > On Tue, Dec 20, 2022 at 2:46 PM Hayato Kuroda (Fujitsu) > wrote: > > > > Dear hackers, > > > > > We have discussed three different ways to provide GUC for these > > > features. (1) Have separate GUCs like force_server_stream_mode, > > >

Re: Use get_call_result_type() more widely

2022-12-20 Thread Bharath Rupireddy
On Wed, Dec 21, 2022 at 6:44 AM Michael Paquier wrote: > > I have applied v2-0001. Thanks for taking care of this. By seeing the impact that get_call_result_type() can have for the functions that are possibly called repeatedly, I couldn't resist sharing a patch (attached herewith) that adds a

Re: Force streaming every change in logical decoding

2022-12-20 Thread shveta malik
Going with ' logical_decoding_work_mem' seems a reasonable solution, but since we are mixing the functionality of developer and production GUC, there is a slight risk that customer/DBAs may end up setting it to 0 and forget about it and thus hampering system's performance. Have seen many such

Re: Small miscellaneus fixes (Part II)

2022-12-20 Thread Michael Paquier
On Tue, Dec 20, 2022 at 06:51:34PM -0600, Justin Pryzby wrote: > On Fri, Nov 25, 2022 at 06:27:04PM -0300, Ranier Vilela wrote: > > 5. Use boolean operator with boolean operands > > (b/src/backend/commands/tablecmds.c) > > tablecmds.c: right. Since 074c5cfbf Most of this does not seem to be

RE: Force streaming every change in logical decoding

2022-12-20 Thread Hayato Kuroda (Fujitsu)
Dear Amit, > The other possibility to achieve what you are saying is that we allow > a minimum value of logical_decoding_work_mem as 0 which would mean > stream or serialize each change depending on whether the streaming > option is enabled. I understood that logical_decoding_work_mem may double

Re: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures

2022-12-20 Thread Bharath Rupireddy
On Wed, Dec 21, 2022 at 5:39 AM Michael Paquier wrote: > > On Tue, Dec 20, 2022 at 06:04:40PM +0530, Bharath Rupireddy wrote: > > On Tue, Dec 20, 2022 at 1:27 PM Magnus Hagander wrote: > >> Caught this thread late. To me, pg_dissect_walfile_name() is a > >> really strange name for a function.

Re: Add SHELL_EXIT_CODE to psql

2022-12-20 Thread Corey Huinker
I've rebased and updated the patch to include documentation. Regression tests have been moved to a separate patchfile because error messages will vary by OS and configuration, so we probably can't do a stable regression test, but having them handy at least demonstrates the feature. On Sun, Dec

Re: New strategies for freezing, advancing relfrozenxid early

2022-12-20 Thread Peter Geoghegan
On Tue, Dec 20, 2022 at 7:15 PM Peter Geoghegan wrote: > On Tue, Dec 20, 2022 at 5:44 PM Jeff Davis wrote: > > Next, the 'freeze_required' field suggests that it's more involved in > > the control flow that causes freezing than it actually is. All it does > > is communicate how the trackers need

Re: Simplifications for error messages related to compression

2022-12-20 Thread Justin Pryzby
On Wed, Dec 21, 2022 at 01:52:21PM +0900, Michael Paquier wrote: > On Tue, Dec 20, 2022 at 08:29:32PM -0600, Justin Pryzby wrote: > > - pg_fatal("not built with zlib support"); > > + pg_fatal("this build does not support compression > > with %s",

Re: assertion failures on BuildFarm that happened in slab.c

2022-12-20 Thread David Rowley
On Wed, 21 Dec 2022 at 18:04, Michael Paquier wrote: > Good catch. Yes, d21ded7 looks to have issues. I am adding David in > CC. Thanks. I'll look now. David

Re: assertion failures on BuildFarm that happened in slab.c

2022-12-20 Thread Michael Paquier
On Wed, Dec 21, 2022 at 03:28:01AM +, Takamichi Osumi (Fujitsu) wrote: > The last failure for subscriptionCheck before those for HEAD happened 66 days > ago [3] > and I checked all failures there within 90 days. There is no similar failure. > > I'm not sure, but this could be related to a

Re: Refactor SCRAM code to dynamically handle hash type and key length

2022-12-20 Thread Michael Paquier
On Tue, Dec 20, 2022 at 08:45:29PM -0500, Jonathan S. Katz wrote: > On 12/20/22 2:25 AM, Michael Paquier wrote: >> 4) The case of MD5 is something that looks a bit tricky at quick >> glance. We know that if the role has a MD5 password stored, we will >> fail anyway. So we could just advertise

Re: Simplifications for error messages related to compression

2022-12-20 Thread Michael Paquier
On Tue, Dec 20, 2022 at 08:29:32PM -0600, Justin Pryzby wrote: > - pg_fatal("not built with zlib support"); > + pg_fatal("this build does not support compression > with %s", "gzip"); > > I tried to say in the other thread that gzip != zlib. > > This

Optimization issue of branching UNION ALL

2022-12-20 Thread Andrey Lepikhov
Hi, Client report on a corner case have shown up possible minor non-optimality in procedure of transformation of simple UNION ALL statement tree. Complaint is about auto-generated query with 1E4 simple union all's (see t.sh to generate a demo script). The reason: in REL_11_STABLE it is

assertion failures on BuildFarm that happened in slab.c

2022-12-20 Thread Takamichi Osumi (Fujitsu)
Hi, hackers I've found two assertion failures on BuildFarm [1][2]. The call stack can be found in [2]. TRAP: failed Assert("dlist_is_empty(blocklist)"), File: "slab.c", Line: 564, PID: 16148 postgres: publisher: walsender postgres postgres [local]

Re: Array initialisation notation in syscache.c

2022-12-20 Thread Thomas Munro
On Wed, Dec 21, 2022 at 1:33 PM Thomas Munro wrote: > KEY(Anum_pg_attribute_attrelid, > Anum_pg_attribute_attnum), I independently rediscovered that our VA_ARGS_NARGS() macro in c.h always returns 1 on MSVC via trial-by-CI. Derp. Here is the same patch, no change from v2,

Re: New strategies for freezing, advancing relfrozenxid early

2022-12-20 Thread Peter Geoghegan
On Tue, Dec 20, 2022 at 5:44 PM Jeff Davis wrote: > Comments on 0002: > > Can you explain the following portion of the diff: > > > - else if (MultiXactIdPrecedes(multi, cutoffs->MultiXactCutoff)) > + else if (MultiXactIdPrecedes(multi, cutoffs->OldestMxact)) > > ... > > + /* Can't violate

Re: Simplifications for error messages related to compression

2022-12-20 Thread Justin Pryzby
On Wed, Dec 21, 2022 at 10:43:19AM +0900, Michael Paquier wrote: > On Mon, Dec 19, 2022 at 02:42:13PM +0900, Michael Paquier wrote: > > Thoughts or objections? > > Hearing nothing, done.. - pg_fatal("not built with zlib support"); + pg_fatal("this

Re: Perform streaming logical transactions by background workers and parallel apply

2022-12-20 Thread Peter Smith
On Tue, Dec 20, 2022 at 5:22 PM Peter Smith wrote: > > On Tue, Dec 20, 2022 at 2:20 PM Amit Kapila wrote: > > > > On Tue, Dec 20, 2022 at 8:17 AM Peter Smith wrote: > > > > > > Summary > > > --- > > > > > > In summary, everything I have tested so far appeared to be working > > > properly.

Re: [PATCH] Add function to_oct

2022-12-20 Thread Ian Lawrence Barwick
2022年12月21日(水) 10:42 Eric Radman : > > On Wed, Dec 21, 2022 at 08:36:40AM +0900, Ian Lawrence Barwick wrote: > > 2022年12月21日(水) 7:08 Eric Radman :> > > > Hello! > > > > > > This patch is a new function based on the implementation of to_hex(int). > > > > > > Since support for octal integer literals

Re: Avoid lost result of recursion (src/backend/optimizer/util/inherit.c)

2022-12-20 Thread David Rowley
On Wed, 21 Dec 2022 at 13:15, Ranier Vilela wrote: > IMO, I think that commit a61b1f7, has an oversight. > Currently is losing the result of recursion of function > translate_col_privs_multilevel. > > Once the variable result (Bitmapset pointer) is reassigned. > > Without a test case for this

Re: Refactor SCRAM code to dynamically handle hash type and key length

2022-12-20 Thread Jonathan S. Katz
On 12/20/22 2:25 AM, Michael Paquier wrote: On Tue, Dec 20, 2022 at 08:58:38AM +0900, Michael Paquier wrote: Thanks! I have applied for I have here.. There are other pieces to think about in this area. FYI, I have spent a few hours looking at the remaining parts of the SCRAM code that could

Re: New strategies for freezing, advancing relfrozenxid early

2022-12-20 Thread Jeff Davis
On Sun, 2022-12-18 at 14:20 -0800, Peter Geoghegan wrote: > On Thu, Dec 15, 2022 at 10:53 AM Peter Geoghegan wrote: > > I agree that the burden of catch-up freezing is excessive here (in > > fact I already wrote something to that effect on the wiki page). > > The > > likely solution can be simple

Re: Simplifications for error messages related to compression

2022-12-20 Thread Michael Paquier
On Mon, Dec 19, 2022 at 02:42:13PM +0900, Michael Paquier wrote: > Thoughts or objections? Hearing nothing, done.. -- Michael signature.asc Description: PGP signature

Re: [PATCH] Add function to_oct

2022-12-20 Thread Eric Radman
On Wed, Dec 21, 2022 at 08:36:40AM +0900, Ian Lawrence Barwick wrote: > 2022年12月21日(水) 7:08 Eric Radman :> > > Hello! > > > > This patch is a new function based on the implementation of to_hex(int). > > > > Since support for octal integer literals was added, to_oct(int) allows > > octal values to

Re: Use get_call_result_type() more widely

2022-12-20 Thread Michael Paquier
On Tue, Dec 20, 2022 at 11:12:09AM -0500, Tom Lane wrote: > On the whole, I'm content to leave the BlessTupleDesc calls in > these callers. They are cheap enough if the tupdesc is already > blessed. Yeah, agreed. I have applied v2-0001, after fixing one error in wparser.c where some of the

Re: Perform streaming logical transactions by background workers and parallel apply

2022-12-20 Thread Peter Smith
FYI - applying v63-0001 using the latest master does not work. git apply ../patches_misc/v63-0001-Perform-streaming-logical-transactions-by-parall.patch error: patch failed: src/backend/replication/logical/meson.build:1 error: src/backend/replication/logical/meson.build: patch does not apply

Re: Small miscellaneus fixes (Part II)

2022-12-20 Thread Justin Pryzby
On Fri, Nov 25, 2022 at 06:27:04PM -0300, Ranier Vilela wrote: > 5. Use boolean operator with boolean operands > (b/src/backend/commands/tablecmds.c) tablecmds.c: right. Since 074c5cfbf pg_dump.c: right. Since b08dee24a > 4. Fix dead code (src/backend/utils/adt/formatting.c) > Np->sign ==

Re: Array initialisation notation in syscache.c

2022-12-20 Thread Thomas Munro
On Wed, Dec 21, 2022 at 12:05 PM Tom Lane wrote: > Thomas Munro writes: > > Do you think this is better? > > I'm not at all on board with adding runtime overhead to > save maintaining the nkeys fields. I don't see how to do it at compile time without getting the preprocessor involved. What do

Avoid lost result of recursion (src/backend/optimizer/util/inherit.c)

2022-12-20 Thread Ranier Vilela
Hi. IMO, I think that commit a61b1f7 , has an oversight. Currently is losing the result of recursion of function translate_col_privs_multilevel. Once the variable result (Bitmapset pointer) is reassigned.

Re: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures

2022-12-20 Thread Michael Paquier
On Tue, Dec 20, 2022 at 06:04:40PM +0530, Bharath Rupireddy wrote: > On Tue, Dec 20, 2022 at 1:27 PM Magnus Hagander wrote: >> Caught this thread late. To me, pg_dissect_walfile_name() is a >> really strange name for a function. Grepping our I code I see the >> term dissect s used somewhere

Re: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures

2022-12-20 Thread Ian Lawrence Barwick
2022年12月20日(火) 21:35 Bharath Rupireddy : > > On Tue, Dec 20, 2022 at 1:27 PM Magnus Hagander wrote: > > > > On Tue, Dec 20, 2022 at 5:40 AM Michael Paquier wrote: > >> > >> On Tue, Dec 20, 2022 at 09:01:02AM +0900, Michael Paquier wrote: > >> > Yeah, my mind was considering as well yesterday the

Re: Support logical replication of DDLs

2022-12-20 Thread Peter Smith
On Tue, Dec 20, 2022 at 2:29 AM Alvaro Herrera wrote: > > On 2022-Oct-31, Peter Smith wrote: > > > 6. add_policy_clauses > > > > + else > > + { > > + append_bool_object(policyStmt, "present", false); > > + } > > > > Something seems strange. Probably I'm wrong but just by code > > inspection it

Re: [PATCH] Add function to_oct

2022-12-20 Thread Ian Lawrence Barwick
2022年12月21日(水) 7:08 Eric Radman :> > Hello! > > This patch is a new function based on the implementation of to_hex(int). > > Since support for octal integer literals was added, to_oct(int) allows > octal values to be easily stored and returned in query results. > > to_oct(0o755) = '755' > > This

Re: Array initialisation notation in syscache.c

2022-12-20 Thread Tom Lane
Thomas Munro writes: > Do you think this is better? I'm not at all on board with adding runtime overhead to save maintaining the nkeys fields. Getting rid of the useless trailing zeroes in the key[] arrays is clearly a win, though. I'm kind of neutral on using "[N] = " as a substitute for

Re: meson files copyright

2022-12-20 Thread Thomas Munro
On Tue, Dec 20, 2022 at 6:27 PM Noah Misch wrote: > On Mon, Dec 19, 2022 at 09:09:25PM +0100, Peter Eisentraut wrote: > > On 19.12.22 19:33, Robert Haas wrote: > > >On Mon, Dec 19, 2022 at 1:03 PM Tom Lane wrote: > > >>Vik Fearing writes: > > >>>Perhaps a bit off-topic, but what is the point of

Array initialisation notation in syscache.c

2022-12-20 Thread Thomas Munro
Hi, While hacking on a new system catalogue for a nearby thread, it occurred to me that syscache.c's table of entries could be made more readable and less error prone. They look like this: {AttributeRelationId, /* ATTNUM */ AttributeRelidNumIndexId,

Re: pgsql: Doc: Explain about Column List feature.

2022-12-20 Thread Peter Smith
On Tue, Dec 20, 2022 at 7:21 PM Alvaro Herrera wrote: > > On 2022-Dec-20, Peter Smith wrote: > > > If you change this warning title then it becomes the odd one out - > > every other warning in all the pg docs just says "Warning". IMO > > maintaining consistency throughout is best. e.g. I can

[PATCH] Add function to_oct

2022-12-20 Thread Eric Radman
Hello! This patch is a new function based on the implementation of to_hex(int). Since support for octal integer literals was added, to_oct(int) allows octal values to be easily stored and returned in query results. to_oct(0o755) = '755' This is probably most useful for storing file system

Re: appendBinaryStringInfo stuff

2022-12-20 Thread Robert Haas
On Tue, Dec 20, 2022 at 10:47 AM Andrew Dunstan wrote: > There are 5 uses in the jsonb code where the length param is a compile > time constant: > > andrew@ub22:adt $ grep appendBinary.*[0-9] jsonb* > jsonb.c:appendBinaryStringInfo(out, "null", 4); > jsonb.c:

Re: Minimal logical decoding on standbys

2022-12-20 Thread Robert Haas
On Tue, Dec 20, 2022 at 3:39 PM Robert Haas wrote: > I think this might be the only WAL record type where there's a > problem, but I haven't fully confirmed that yet. It's not. GIST has the same issue. The same test case demonstrates the problem there, if you substitute this test script for

Re: Common function for percent placeholder replacement

2022-12-20 Thread Corey Huinker
> > How about this new one with variable arguments? I like this a lot, but I also see merit in Alvaro's PERCENT_OPT variadic, which at least avoids the two lists getting out of sync. Initially, I was going to ask that we have shell-quote-safe equivalents of whatever fixed parameters we baked

Re: appendBinaryStringInfo stuff

2022-12-20 Thread David Rowley
On Wed, 21 Dec 2022 at 04:47, Andrew Dunstan wrote: > jsonb.c:appendBinaryStringInfo(out, "", 4); > > None of these really bother me much, TBH. In fact the last one is > arguably nicer because it tells you without counting how many spaces > there are. appendStringInfoSpaces()

Re: Minimal logical decoding on standbys

2022-12-20 Thread Robert Haas
On Tue, Dec 20, 2022 at 1:25 PM Robert Haas wrote: > I'm going to go through all the record types one by one before > commenting further. OK, so xl_hash_vacuum_one_page, at least, is a live issue. To reproduce: ./configure echo 'COPT=-fsanitize=alignment -fno-sanitize-recover=all' >

Re: Minimal logical decoding on standbys

2022-12-20 Thread Drouvot, Bertrand
Hi, On 12/20/22 7:31 PM, Robert Haas wrote: On Tue, Dec 20, 2022 at 1:19 PM Andres Freund wrote: I don't understand what the "may*" or "*Possible" really are about. snapshotConflictHorizon is a conflict with a certain xid - there commonly won't be anything to conflict with. If there's a

Re: MultiXact\SLRU buffers configuration

2022-12-20 Thread Andrey Borodin
On Sat, Jul 23, 2022 at 1:48 AM Thomas Munro wrote: > > On Sat, Jul 23, 2022 at 8:41 PM Andrey Borodin wrote: > > Thomas, do you still have any doubts? Or is it certain that SLRU will be > > replaced by any better subsystem in 16? > > Hi Andrey, > > Sorry for my lack of replies on this and the

Re: Minimal logical decoding on standbys

2022-12-20 Thread Robert Haas
On Tue, Dec 20, 2022 at 1:19 PM Andres Freund wrote: > I don't understand what the "may*" or "*Possible" really are > about. snapshotConflictHorizon is a conflict with a certain xid - there > commonly won't be anything to conflict with. If there's a conflict in > the logical-decoding-on-standby

Re: Minimal logical decoding on standbys

2022-12-20 Thread Robert Haas
On Wed, Dec 14, 2022 at 12:48 PM Robert Haas wrote: > No? Nope, I was wrong. The block reference data is stored in the WAL record *before* the main data, so it was wrong to imagine (as I did) that the alignment of the main data would affect the alignment of the block data. If anything, it's the

Re: meson and tmp_install

2022-12-20 Thread Andres Freund
Hi, On 2022-12-20 21:11:26 +0300, Nikita Malakhov wrote: > Didn't know where to ask, so I've chosen this thread - there is no any > documentation on meson build platform in PostgreSQL docs. There is now: https://www.postgresql.org/docs/devel/install-meson.html Needs further work, but it's a

Re: Minimal logical decoding on standbys

2022-12-20 Thread Andres Freund
On 2022-12-16 11:38:33 -0500, Robert Haas wrote: > On Fri, Dec 16, 2022 at 10:08 AM Drouvot, Bertrand > wrote: > > > After 1489b1ce728 the name mayConflictInLogicalDecoding seems odd. Seems > > > it should be a riff on snapshotConflictHorizon? > > > > Gotcha, what about

Re: Checksum errors in pg_stat_database

2022-12-20 Thread Andres Freund
Hi, On 2022-12-11 20:48:15 -0500, Tom Lane wrote: > Michael Paquier writes: > > On Sun, Dec 11, 2022 at 04:51:49PM -0800, Andres Freund wrote: > >> I think there's a good argument for starting to track some stats based on > >> the > >> relfilenode, rather the oid, because it'd allow us to track

Re: meson and tmp_install

2022-12-20 Thread Nikita Malakhov
Hi! Didn't know where to ask, so I've chosen this thread - there is no any documentation on meson build platform in PostgreSQL docs. Is this okay? For me it was a surprise when the meson platform was added, and I have had to spend some time sweeping through meson docs when I'd added new source

Re: New strategies for freezing, advancing relfrozenxid early

2022-12-20 Thread Nikita Malakhov
Hi! I'll try to apply this patch onto my branch with Pluggable TOAST to test these mechanics with new TOAST. Would reply on the result. It could be difficult though, because both have a lot of changes that affect the same code. >I'm not sure how much this would help with bloat. I suspect that it

Re: appendBinaryStringInfo stuff

2022-12-20 Thread Andres Freund
Hi, On 2022-12-19 21:29:10 +1300, David Rowley wrote: > On Mon, 19 Dec 2022 at 21:12, Andres Freund wrote: > > Perhaps we should make appendStringInfoString() a static inline function > > - most compilers can compute strlen() of a constant string at compile > > time. > > I had wondered about

Re: Call lazy_check_wraparound_failsafe earlier for parallel vacuum

2022-12-20 Thread Imseih (AWS), Sami
Attached is a patch to check scanned pages rather than blockno. Regards, Sami Imseih Amazon Web Services (AWS) v1-0001-fixed-when-wraparound-failsafe-is-checked.patch Description: v1-0001-fixed-when-wraparound-failsafe-is-checked.patch

Re: Inconsistency in reporting checkpointer stats

2022-12-20 Thread Andres Freund
On 2022-12-20 08:18:36 -0500, Robert Haas wrote: > I think that the SLRU information is potentially useful, but mixing it > with the information about regular buffers just seems confusing. +1 At least for now, it'd be different if/when we manage to move SLRUs to the main buffer pool. - Andres

Re: meson files copyright

2022-12-20 Thread Andres Freund
Hi, On 2022-12-19 10:20:45 -0500, Tom Lane wrote: > Their comment density is pretty awful too --- maybe I'm just > not used to meson, but they seem just about completely undocumented. > And there's certainly been no effort to transfer the accumulated wisdom > of the makefile comments (where it's

Re: meson and tmp_install

2022-12-20 Thread Andres Freund
Hi, On 2022-12-20 07:12:04 -0500, Andrew Dunstan wrote: > Yesterday when testing a patch I got annoyed when my test failed. I > tested it like this: > > meson test ldap_password_func/001_mutated_bindpasswd > > It turned out that I needed to do this: > > meson test tmp_install

Re: meson files copyright

2022-12-20 Thread Andres Freund
On 2022-12-19 13:33:46 -0500, Robert Haas wrote: > On Mon, Dec 19, 2022 at 1:03 PM Tom Lane wrote: > > Vik Fearing writes: > > > Perhaps a bit off-topic, but what is the point of the file identifiers? > > > > IMO, it helps to tell things apart when you've got a bunch of editor > > windows open

Re: Use get_call_result_type() more widely

2022-12-20 Thread Tom Lane
Bharath Rupireddy writes: > On Tue, Dec 20, 2022 at 1:41 PM Tom Lane wrote: >> Hmm ... at least one of the paths through internal_get_result_type >> is intentionally blessing the result tupdesc: >> but it's not clear if they all do, and the comments certainly >> aren't promising it. > It looks

Re: appendBinaryStringInfo stuff

2022-12-20 Thread Andrew Dunstan
On 2022-12-19 Mo 17:48, David Rowley wrote: > On Tue, 20 Dec 2022 at 11:42, Tom Lane wrote: >> I think Peter is entirely right to question whether *this* type's >> output function is performance-critical. Who's got large tables with >> jsonpath columns? It seems to me the type would mostly

Re: Add LZ4 compression in pg_dump

2022-12-20 Thread Justin Pryzby
On Tue, Dec 20, 2022 at 11:19:15AM +, gkokola...@pm.me wrote: > --- Original Message --- > On Monday, December 19th, 2022 at 6:27 PM, Justin Pryzby > wrote: > > On Mon, Dec 19, 2022 at 05:03:21PM +, gkokola...@pm.me wrote: > > > > > > > 001 still doesn't compile on freebsd, and

Re: Avoid generating SSL certs for LDAP tests

2022-12-20 Thread Andrew Dunstan
On 2022-12-19 Mo 11:04, Andrew Dunstan wrote: > On 2022-12-19 Mo 10:25, Tom Lane wrote: >> Andrew Dunstan writes: >>> We don't generate SSL certificates for running the SSL tests, but >>> instead use pregenerated certificates that are part of our source code. >>> This patch applies the same

Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication

2022-12-20 Thread Melih Mutlu
Hi Amit, Amit Kapila , 16 Ara 2022 Cum, 05:46 tarihinde şunu yazdı: > Right, but when the size is 100MB, it seems to be taking a bit more > time. Do we want to evaluate with different sizes to see how it looks? > Other than that all the numbers are good. > I did a similar testing with again

Re: code cleanups

2022-12-20 Thread Ranier Vilela
Justin Pryzby writes: > Some modest cleanups I've accumulated Hi Justin. 0001: Regarding initializer {0}, the problem is still with old compilers, which don't initialize exactly like memset. Only more modern compilers fill in any "holes" that may exist. This means that as old compilers are not

Re: Inconsistency in reporting checkpointer stats

2022-12-20 Thread Robert Haas
On Tue, Dec 20, 2022 at 8:03 AM Nitin Jadhav wrote: > Thanks Robert for sharing your thoughts. > My first thought was to just remove counting SLRU buffers, then after > some more analysis, I found that the checkpointer is responsible for > including both regular data buffers and SLRU buffers. I

Re: Inconsistency in reporting checkpointer stats

2022-12-20 Thread Nitin Jadhav
> Presumably we could make this consistent either by counting SLRU > writes in both places, or by counting them in neither place. This > proposal would count them in both places. But why is that the right > thing to do? > > I'm somewhat inclined to think that we should use "buffers" to mean >

Re: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures

2022-12-20 Thread Bharath Rupireddy
On Tue, Dec 20, 2022 at 1:27 PM Magnus Hagander wrote: > > On Tue, Dec 20, 2022 at 5:40 AM Michael Paquier wrote: >> >> On Tue, Dec 20, 2022 at 09:01:02AM +0900, Michael Paquier wrote: >> > Yeah, my mind was considering as well yesterday the addition of a note >> > in the docs about something

Re: meson files copyright

2022-12-20 Thread Andrew Dunstan
On 2022-12-20 Tu 00:26, Noah Misch wrote: > On Mon, Dec 19, 2022 at 09:09:25PM +0100, Peter Eisentraut wrote: >> On 19.12.22 19:33, Robert Haas wrote: >>> On Mon, Dec 19, 2022 at 1:03 PM Tom Lane wrote: Vik Fearing writes: > Perhaps a bit off-topic, but what is the point of the file

meson and tmp_install

2022-12-20 Thread Andrew Dunstan
Yesterday when testing a patch I got annoyed when my test failed. I tested it like this: meson test ldap_password_func/001_mutated_bindpasswd It turned out that I needed to do this: meson test tmp_install ldap_password_func/001_mutated_bindpasswd The Makefile equivalent ensures that

Re: Allow batched insert during cross-partition updates

2022-12-20 Thread Amit Langote
On Tue, Dec 20, 2022 at 7:18 PM Etsuro Fujita wrote: > On Wed, Dec 14, 2022 at 10:29 PM Amit Langote wrote: > > On Wed, Dec 14, 2022 at 6:45 PM Etsuro Fujita > > wrote: > > > One thing I noticed is this bit: > > > > > > -- Clean up > > > -DROP TABLE batch_table, batch_cp_upd_test,

Re: Add LZ4 compression in pg_dump

2022-12-20 Thread gkokolatos
--- Original Message --- On Monday, December 19th, 2022 at 6:27 PM, Justin Pryzby wrote: > > > On Mon, Dec 19, 2022 at 05:03:21PM +, gkokola...@pm.me wrote: > > > > > 001 still doesn't compile on freebsd, and 002 doesn't compile on > > > > windows. Have you checked test

Re: Use get_call_result_type() more widely

2022-12-20 Thread Bharath Rupireddy
On Tue, Dec 20, 2022 at 1:41 PM Tom Lane wrote: > > Michael Paquier writes: > > On Mon, Dec 19, 2022 at 07:41:27PM +0530, Bharath Rupireddy wrote: > >> 0002 - gets rid of an unnecessary call to BlessTupleDesc() > >> after get_call_result_type(). > > > Hmm. I am not sure whether this is right,

Re: Force streaming every change in logical decoding

2022-12-20 Thread Amit Kapila
On Tue, Dec 20, 2022 at 2:46 PM Hayato Kuroda (Fujitsu) wrote: > > Dear hackers, > > > We have discussed three different ways to provide GUC for these > > features. (1) Have separate GUCs like force_server_stream_mode, > > force_server_serialize_mode, force_client_serialize_mode (we can use > >

Re: Allow batched insert during cross-partition updates

2022-12-20 Thread Etsuro Fujita
Hi Amit-san, On Wed, Dec 14, 2022 at 10:29 PM Amit Langote wrote: > On Wed, Dec 14, 2022 at 6:45 PM Etsuro Fujita wrote: > > One thing I noticed is this bit: > > > > -- Clean up > > -DROP TABLE batch_table, batch_cp_upd_test, batch_table_p0, > > batch_table_p1 CASCADE; > > +DROP TABLE

RE: Perform streaming logical transactions by background workers and parallel apply

2022-12-20 Thread houzj.f...@fujitsu.com
On Monday, December 19, 2022 8:47 PMs Amit Kapila : > > On Sat, Dec 17, 2022 at 7:34 PM houzj.f...@fujitsu.com > wrote: > > > > Agreed. I have addressed all the comments and did some cosmetic changes. > > Attach the new version patch set. > > > > Few comments: > > 1. > + if

Re: Minimal logical decoding on standbys

2022-12-20 Thread Drouvot, Bertrand
Hi, On 12/16/22 6:24 PM, Drouvot, Bertrand wrote: Hi, On 12/16/22 5:38 PM, Robert Haas wrote: On Fri, Dec 16, 2022 at 10:08 AM Drouvot, Bertrand wrote: After 1489b1ce728 the name mayConflictInLogicalDecoding seems odd. Seems it should be a riff on snapshotConflictHorizon? Gotcha, what

Re: Add enable_presorted_aggregate GUC

2022-12-20 Thread David Rowley
On Fri, 16 Dec 2022 at 12:47, David Rowley wrote: > Normally we add some enable_* GUC to leave an escape hatch when we add > some new feature like this. I likely should have done that when I > added 1349d279, but I didn't and I want to now. > > I mainly just shifted this discussion out of [1] as

Container Types

2022-12-20 Thread Vik Fearing
The standard has several constructs for creating new types from other types. I don't mean anything like CREATE TYPE here, I mean things like this: - ROW(a, b, c), () - ARRAY[a, b, c], () - PERIOD(a, b), () - MULTISET[a, b, c], () - MDARRAY[x(1:3)][a, b, c], () I am not sure what magic we use

RE: Force streaming every change in logical decoding

2022-12-20 Thread Hayato Kuroda (Fujitsu)
Dear hackers, > We have discussed three different ways to provide GUC for these > features. (1) Have separate GUCs like force_server_stream_mode, > force_server_serialize_mode, force_client_serialize_mode (we can use > different names for these) for each of these; (2) Have two sets of > GUCs for

Re: Force streaming every change in logical decoding

2022-12-20 Thread Amit Kapila
On Tue, Dec 20, 2022 at 10:52 AM Dilip Kumar wrote: > > On Wed, Dec 14, 2022 at 5:29 PM Amit Kapila wrote: > > > > On Wed, Dec 14, 2022 at 2:15 PM shiy.f...@fujitsu.com > > wrote: > > > > > > Please see the attached patch. I also fix Peter's comments[1]. The GUC > > > name and > > > design are

Re: Perform streaming logical transactions by background workers and parallel apply

2022-12-20 Thread Amit Kapila
On Mon, Dec 19, 2022 at 6:17 PM Amit Kapila wrote: > > On Sat, Dec 17, 2022 at 7:34 PM houzj.f...@fujitsu.com > wrote: > > > > Agreed. I have addressed all the comments and did some cosmetic changes. > > Attach the new version patch set. > > > > Few comments: > > Few more minor

Re: New strategies for freezing, advancing relfrozenxid early

2022-12-20 Thread Jeff Davis
On Sun, 2022-12-18 at 14:20 -0800, Peter Geoghegan wrote: > Attached is v10, which fixes this issue, but using a different > approach to the one I sketched here. In 0001, it's fairly straightforward rearrangement and looks like an improvement to me. I have a few complaints, but they are about

Re: slab allocator performance issues

2022-12-20 Thread David Rowley
On Tue, 20 Dec 2022 at 21:19, John Naylor wrote: > > > On Tue, Dec 20, 2022 at 10:36 AM David Rowley wrote: > > > > I'm planning on pushing the attached v3 patch shortly. I've spent > > several days reading over this and testing it in detail along with > > adding additional features to the

Re: pgsql: Doc: Explain about Column List feature.

2022-12-20 Thread Alvaro Herrera
On 2022-Dec-20, Amit Kapila wrote: > + > +Combining Column Lists from Multiple Subscriptions > > Shouldn't the title be "Combining Column Lists from Multiple > Publications"? We can define column lists while defining publications > so the proposed title doesn't seem to be conveying the

Re: pgsql: Doc: Explain about Column List feature.

2022-12-20 Thread Alvaro Herrera
On 2022-Dec-20, Peter Smith wrote: > If you change this warning title then it becomes the odd one out - > every other warning in all the pg docs just says "Warning". IMO > maintaining consistency throughout is best. e.g. I can imagine maybe > someone searching for "Warning" in the docs, and now

Re: slab allocator performance issues

2022-12-20 Thread John Naylor
On Tue, Dec 20, 2022 at 10:36 AM David Rowley wrote: > > I'm planning on pushing the attached v3 patch shortly. I've spent > several days reading over this and testing it in detail along with > adding additional features to the SlabCheck code to find more > inconsistencies. FWIW, I reran my test

Re: Use get_call_result_type() more widely

2022-12-20 Thread Tom Lane
Michael Paquier writes: > On Mon, Dec 19, 2022 at 07:41:27PM +0530, Bharath Rupireddy wrote: >> 0002 - gets rid of an unnecessary call to BlessTupleDesc() >> after get_call_result_type(). > Hmm. I am not sure whether this is right, actually.. Hmm ... at least one of the paths through