Re: generic plans and "initial" pruning

2022-03-31 Thread Amit Langote
On Fri, Apr 1, 2022 at 1:08 PM David Rowley wrote: > On Fri, 1 Apr 2022 at 16:09, Amit Langote wrote: > > definition of PlannedStmt says this: > > > > /* > > * PlannedStmt node > > * > > * The output of the planner > > > > With the ideas that you've outlined below, perhap

Re: Error "initial slot snapshot too large" in create replication slot

2022-03-31 Thread Kyotaro Horiguchi
At Fri, 01 Apr 2022 14:44:30 +0900 (JST), Kyotaro Horiguchi wrote in > At Sun, 13 Feb 2022 17:35:38 +0300, Yura Sokolov > wrote in > > And there are checks for `takenDuringRecovery` in `heapgetpage` and > > `heapam_scan_sample_next_tuple`. Are this checks affected by the change? > > Neither t

Re: wrong fds used for refilenodes after pg_upgrade relfilenode changes Reply-To:

2022-03-31 Thread Thomas Munro
Some thoughts: The v1-0003 patch introduced smgropen_cond() to avoid the problem of IssuePendingWritebacks(), which does desynchronised smgropen() calls and could open files after the barrier but just before they are unlinked. Makes sense, but... 1. For that to actually work, we'd better call s

Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set

2022-03-31 Thread Michael Paquier
On Thu, Mar 31, 2022 at 10:51:59PM -0500, Justin Pryzby wrote: > Is diff -q defined somewhere ? I can't find it in postgres sources nor in > sources for bf client. 322becb has added such a call, at the end of 002_pg_upgrade.pl. vcregress.pl also has one before this commit. -- Michael signature.

Re: Higher level questions around shared memory stats

2022-03-31 Thread Kyotaro Horiguchi
At Thu, 31 Mar 2022 22:12:25 -0700, Andres Freund wrote in > Hi, > > On 2022-03-31 20:06:07 -0700, David G. Johnston wrote: > > Do we really think no one has taken our advice in the documentation and > > moved their stats_temp_directory to a RAM-based file system? > > I'm pretty sure some have,

Re: psql - add SHOW_ALL_RESULTS option

2022-03-31 Thread Fabien COELHO
Attached a rebase. Again, after the SendQuery refactoring extraction. -- Fabien.diff --git a/contrib/pg_stat_statements/expected/pg_stat_statements.out b/contrib/pg_stat_statements/expected/pg_stat_statements.out index e0abe34bb6..8f7f93172a 100644 --- a/contrib/pg_stat_statements/expected/pg

Re: Error "initial slot snapshot too large" in create replication slot

2022-03-31 Thread Kyotaro Horiguchi
At Sun, 13 Feb 2022 17:35:38 +0300, Yura Sokolov wrote in > В Пн, 07/02/2022 в 13:52 +0530, Dilip Kumar пишет: > > Right. I think the patch looks fine to me. > > > > Good day. > > I've looked to the patch. Personally I'd prefer dynamically resize > xip array. But I think there is issue with u

Re: logical decoding and replication of sequences

2022-03-31 Thread Amit Kapila
On Fri, Apr 1, 2022 at 10:22 AM Masahiko Sawada wrote: > > On Sat, Mar 26, 2022 at 6:56 PM Tomas Vondra > wrote: > > >> > > >> But there's a more serious issue, I think. So far, we allowed this: > > >> > > >> BEGIN; > > >> CREATE SEQUENCE s2; > > >> ALTER PUBLICATION p ADD SEQUENCE s2; > >

Re: Preventing indirection for IndexPageGetOpaque for known-size page special areas

2022-03-31 Thread Michael Paquier
On Thu, Mar 31, 2022 at 12:09:35PM +0200, Matthias van de Meent wrote: > PageInit MAXALIGNs the size of the special area that it receives as an > argument; so any changes to the page header that would misalign the > value would be AM-specific; in which case it is quite unlikely that > this is the r

Re: [HACKERS] WIP aPatch: Pgbench Serialization and deadlock errors

2022-03-31 Thread Fabien COELHO
Or those three columns always, sum_lag sum_lag_2, min_lag max_lag, skipped, retried retries? Anyway now that current CF is closing, it will not be possible to change those logging design soon. Or can we change the logging design even after CF is closed? My 0.02€: I'm not sure how the offici

Re: unnecessary (same) restart_lsn handing in LogicalIncreaseRestartDecodingForSlot

2022-03-31 Thread Amit Kapila
On Wed, Mar 16, 2022 at 5:02 PM Ashutosh Bapat wrote: > > Hi All, > At the beginning of LogicalIncreaseRestartDecodingForSlot(), we have codeine > ``` > 1623 /* don't overwrite if have a newer restart lsn */ > 1624 if (restart_lsn <= slot->data.restart_lsn) > 1625 { > 1626 } > 1627

Re: Higher level questions around shared memory stats

2022-03-31 Thread Andres Freund
Hi, On 2022-03-31 20:06:07 -0700, David G. Johnston wrote: > Do we really think no one has taken our advice in the documentation and > moved their stats_temp_directory to a RAM-based file system? I'm pretty sure some have, I've seen it in the field in the past. > The question is whether current

Re: logical decoding and replication of sequences

2022-03-31 Thread Masahiko Sawada
On Sat, Mar 26, 2022 at 6:56 PM Tomas Vondra wrote: > > > > On 3/26/22 08:28, Amit Kapila wrote: > > On Fri, Mar 25, 2022 at 10:20 PM Tomas Vondra > > wrote: > >> > >> Hmm, so fixing this might be a bit trickier than I expected. > >> > >> Firstly, currently we only send nspname/relname in the seq

Re: proposal: enhancing plpgsql debug API - returns text value of variable content

2022-03-31 Thread Pavel Stehule
čt 31. 3. 2022 v 23:12 odesílatel Tom Lane napsal: > Pavel Stehule writes: > > I am sending updated patch > > After studying the list of exposed functions for awhile, it seemed > to me that we should also expose exec_assign_value. The new pointers > allow a plugin to compute a value in Datum+is

Re: head fails to build on SLES 12 (wal_compression=zstd)

2022-03-31 Thread Michael Paquier
On Thu, Mar 31, 2022 at 09:10:00PM -0400, Tom Lane wrote: > In short, I think we should push Justin's version-check patch, > and also fix the SGML docs to say that we require zstd >= 1.4.0. 1.4.0 was released in April 2019, just 3 years ago. It does not sound that bad to me to make this version n

Re: should vacuum's first heap pass be read-only?

2022-03-31 Thread Peter Geoghegan
On Thu, Mar 31, 2022 at 9:08 PM Dilip Kumar wrote: > But with the conveyor belt > we remember the conveyor belt pageno upto which we have done the index > vacuum and then we only need to do vacuum for the remaining tids which > will definitely reduce the index vacuuming passes, right? Right, exac

Re: standby recovery fails (tablespace related) (tentative patch and discussion)

2022-03-31 Thread Kyotaro Horiguchi
At Tue, 29 Mar 2022 09:31:42 -0400, Robert Haas wrote in > On Tue, Mar 29, 2022 at 9:28 AM Alvaro Herrera > wrote: > > OK, this is a bug that's been open for years. A fix can be committed > > after the feature freeze anyway. > > +1 By the way, may I ask how do we fix this? The existing re

Re: Logical replication timeout problem

2022-03-31 Thread Amit Kapila
On Fri, Apr 1, 2022 at 8:28 AM Euler Taveira wrote: > > On Thu, Mar 31, 2022, at 11:27 PM, Amit Kapila wrote: > > This is exactly our initial analysis and we have tried a patch on > these lines and it has a noticeable overhead. See [1]. Calling this > for each change or each skipped change can bri

Re: generic plans and "initial" pruning

2022-03-31 Thread David Rowley
On Fri, 1 Apr 2022 at 16:09, Amit Langote wrote: > definition of PlannedStmt says this: > > /* > * PlannedStmt node > * > * The output of the planner > > With the ideas that you've outlined below, perhaps we can frame most > of the things that the patch wants to do as the

Re: should vacuum's first heap pass be read-only?

2022-03-31 Thread Dilip Kumar
On Fri, Apr 1, 2022 at 1:55 AM Robert Haas wrote: > > But having said that, coming back to this with fresh eyes, I think > Dilip has a really good point here. If the first thing we do at the > start of every VACUUM is scan the heap in a way that is guaranteed to > rediscover all of the dead TIDs

Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set

2022-03-31 Thread Michael Paquier
On Thu, Mar 31, 2022 at 08:42:41PM -0700, Noah Misch wrote: > The failure looked like this: > > # Running: diff -q > /export/home/nm/farm/studio64v12_6/HEAD/pgsql.build/src/bin/pg_upgrade/tmp_check/tmp_test_lPFv/dump1.sql > > /export/home/nm/farm/studio64v12_6/HEAD/pgsql.build/src/bin/pg_upgrad

Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set

2022-03-31 Thread Michael Paquier
On Fri, Apr 01, 2022 at 10:16:48AM +0900, Michael Paquier wrote: > Okay, done after an extra round of self-review. I have finished by > tweaking a couple of comments, and adjusted further TESTING to explain > what needs to be done to have a dump compatible with the test. Let's > now see what goes

Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set

2022-03-31 Thread Justin Pryzby
On Thu, Mar 31, 2022 at 08:42:41PM -0700, Noah Misch wrote: > On Fri, Apr 01, 2022 at 10:16:48AM +0900, Michael Paquier wrote: > > On Thu, Mar 31, 2022 at 09:49:50AM -0400, Tom Lane wrote: > > > Well, let's go ahead with it and see what happens. If it's too > > > much of a mess we can always rever

Re: Unit tests for SLRU

2022-03-31 Thread Noah Misch
On Thu, Mar 31, 2022 at 05:30:41PM +0300, Aleksander Alekseev wrote: > I used src/test/modules/test_* modules as an example. > If time permits, please take a quick look at the patch and let me know > if I'm moving the right direction. There will be more tests in the > final version, but I would ap

Re: generic plans and "initial" pruning

2022-03-31 Thread Tom Lane
Amit Langote writes: > On Fri, Apr 1, 2022 at 10:32 AM David Rowley wrote: >> 1. You've changed the signature of various functions by adding >> ExecLockRelsInfo *execlockrelsinfo. I'm wondering why you didn't just >> put the ExecLockRelsInfo as a new field in PlannedStmt? > I'm worried about th

Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set

2022-03-31 Thread Noah Misch
On Fri, Apr 01, 2022 at 10:16:48AM +0900, Michael Paquier wrote: > On Thu, Mar 31, 2022 at 09:49:50AM -0400, Tom Lane wrote: > > Well, let's go ahead with it and see what happens. If it's too > > much of a mess we can always revert. > > Okay, done after an extra round of self-review. I have fini

Re: generic plans and "initial" pruning

2022-03-31 Thread Amit Langote
Thanks a lot for looking into this. On Fri, Apr 1, 2022 at 10:32 AM David Rowley wrote: > I've been looking over the v8 patch and I'd like to propose semi-baked > ideas to improve things. I'd need to go and write them myself to > fully know if they'd actually work ok. > > 1. You've changed the s

Re: Higher level questions around shared memory stats

2022-03-31 Thread David G. Johnston
On Thu, Mar 31, 2022 at 7:33 PM Kyotaro Horiguchi wrote: > At Thu, 31 Mar 2022 14:04:16 -0700, Andres Freund > wrote in > > Hi, > > > > On 2022-03-31 16:16:31 +0900, Kyotaro Horiguchi wrote: > > > After moving to shared stats, we might want to expose the GUC variable > > > itself. Then hide/remo

Re: Logical replication timeout problem

2022-03-31 Thread Euler Taveira
On Thu, Mar 31, 2022, at 11:27 PM, Amit Kapila wrote: > This is exactly our initial analysis and we have tried a patch on > these lines and it has a noticeable overhead. See [1]. Calling this > for each change or each skipped change can bring noticeable overhead > that is why we decided to call it

Re: Higher level questions around shared memory stats

2022-03-31 Thread Kyotaro Horiguchi
At Thu, 31 Mar 2022 14:04:16 -0700, Andres Freund wrote in > Hi, > > On 2022-03-31 16:16:31 +0900, Kyotaro Horiguchi wrote: > > After moving to shared stats, we might want to expose the GUC variable > > itself. Then hide/remove the macro PG_STAT_TMP_DIR. This breaks the > > extensions but it is

Re: unlogged sequences

2022-03-31 Thread David G. Johnston
On Thu, Mar 31, 2022 at 6:03 PM Robert Haas wrote: > On Thu, Mar 31, 2022 at 8:44 PM David G. Johnston > wrote: > > > The "give the user power" argument is also valid. But since they > already have power through unowned sequences, having the owned sequences > more narrowly defined doesn't detra

Re: Logical replication timeout problem

2022-03-31 Thread Amit Kapila
On Fri, Apr 1, 2022 at 7:33 AM Euler Taveira wrote: > > On Thu, Mar 31, 2022, at 9:24 AM, Masahiko Sawada wrote: > > On the other hand, possible another solution would be to add a new > callback that is called e.g., every 1000 changes so that walsender > does its job such as timeout handling while

Re: should vacuum's first heap pass be read-only?

2022-03-31 Thread Peter Geoghegan
On Thu, Mar 31, 2022 at 5:31 PM Robert Haas wrote: > > I agree. > > But in > http://postgr.es/m/ca+tgmoa6kveeurtyeoi3a+ra2xuynwqmj_s-h4kun6-bkmm...@mail.gmail.com > (and the messages just before and just after it) we seemed to be > agreeing on a design where that's exactly what happens. It seemed

Re: Logical replication timeout problem

2022-03-31 Thread Euler Taveira
On Thu, Mar 31, 2022, at 9:24 AM, Masahiko Sawada wrote: > The patch basically looks good to me. But the only concern to me is > that once we get the patch committed, we will have to call > update_progress() at all paths in callbacks that process changes. > Which seems poor maintainability. I didn'

Re: Logical replication timeout problem

2022-03-31 Thread Amit Kapila
On Thu, Mar 31, 2022 at 5:55 PM Masahiko Sawada wrote: > On Wed, Mar 30, 2022 at 6:00 PM Amit Kapila wrote: > > > > On Wed, Mar 30, 2022 at 1:24 PM wangw.f...@fujitsu.com > > wrote: > > > > > > On Tues, Mar 29, 2022 at 9:45 AM I wrote: > > > > Attach the new patch. > > > > > > Rebase the patch b

Re: generic plans and "initial" pruning

2022-03-31 Thread David Rowley
On Thu, 31 Mar 2022 at 16:25, Amit Langote wrote: > Rebased. I've been looking over the v8 patch and I'd like to propose semi-baked ideas to improve things. I'd need to go and write them myself to fully know if they'd actually work ok. 1. You've changed the signature of various functions by add

Re: Use "WAL segment" instead of "log segment" consistently in user-facing messages

2022-03-31 Thread Kyotaro Horiguchi
At Thu, 31 Mar 2022 08:45:56 -0700, Nathan Bossart wrote in > At all times, PostgreSQL maintains a > write ahead log (WAL) in the > pg_wal/ > - subdirectory of the cluster's data directory. The log records > - every change made to the database's data files. This log exists > + su

Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set

2022-03-31 Thread Michael Paquier
On Thu, Mar 31, 2022 at 09:49:50AM -0400, Tom Lane wrote: > Well, let's go ahead with it and see what happens. If it's too > much of a mess we can always revert. Okay, done after an extra round of self-review. I have finished by tweaking a couple of comments, and adjusted further TESTING to expl

Re: unlogged sequences

2022-03-31 Thread David G. Johnston
On Thu, Mar 31, 2022 at 6:03 PM Robert Haas wrote: > > In this new system, does the user still get a logged sequence? If they > get an unlogged sequence, how does dump-and-restore work? What if they > want to still have a logged sequence? But for sequences that are > simply owned, there is no pro

Re: head fails to build on SLES 12 (wal_compression=zstd)

2022-03-31 Thread Tom Lane
Robert Haas writes: > On Thu, Mar 31, 2022 at 7:38 PM Tom Lane wrote: >> Indeed. I tried building against 1.3.6 (mainly because it was laying >> around) and the error reported by Devrim is just the tip of the iceberg. >> ... >> I wonder whether Robert's ambition to be compatible with old version

Re: unlogged sequences

2022-03-31 Thread Robert Haas
On Thu, Mar 31, 2022 at 8:44 PM David G. Johnston wrote: > It seems reasonable to extend the definition of "ownership of a sequence" in > this way. We always let you create unowned sequences with whatever > persistence you like if you need flexibility. I'd say it doesn't seem to have any benef

Re: [HACKERS] WIP aPatch: Pgbench Serialization and deadlock errors

2022-03-31 Thread Tatsuo Ishii
> Alvaro Herrera writes: >>> After: >>> interval_start num_transactions sum_latency sum_latency_2 min_latency >>> max_latency >>> { failures | serialization_failures deadlock_failures } [ sum_lag sum_lag_2 >>> min_lag max_lag [ skipped ] ] [ retried retries ] > >> I think that the explanatory p

Re: unlogged sequences

2022-03-31 Thread Robert Haas
On Thu, Mar 31, 2022 at 8:42 PM Tomas Vondra wrote: > Well, yeah. I did this because the patch was somewhat inconsistent when > handling owned sequences - it updated persistence for owned sequences > when persistence for the table changed, expecting to keep them in sync, > but then it also allowed

Re: [WIP] ALTER COLUMN IF EXISTS

2022-03-31 Thread Robert Haas
On Thu, Mar 31, 2022 at 8:02 PM David G. Johnston wrote: > At present the project seems to largely consider the IF EXISTS/IF NOT EXISTS > features to have been largely a mistake and while removing it is not going to > happen the desire to change or extend it is not strong. I like the IF [NOT] E

Re: unlogged sequences

2022-03-31 Thread David G. Johnston
On Thu, Mar 31, 2022 at 5:25 PM Robert Haas wrote: > On Thu, Mar 31, 2022 at 10:14 AM Tomas Vondra > wrote: > > * When linking a sequence to a table (ALTER SEQUENCE ... OWNED BY), > > there's an ereport(ERROR) if the relpersistence values do not match. > > > > * Disallow changing persistence for

Re: unlogged sequences

2022-03-31 Thread Tomas Vondra
On 4/1/22 02:25, Robert Haas wrote: > On Thu, Mar 31, 2022 at 10:14 AM Tomas Vondra > wrote: >> * When linking a sequence to a table (ALTER SEQUENCE ... OWNED BY), >> there's an ereport(ERROR) if the relpersistence values do not match. >> >> * Disallow changing persistence for owned sequences dire

Re: head fails to build on SLES 12 (wal_compression=zstd)

2022-03-31 Thread Robert Haas
On Thu, Mar 31, 2022 at 7:38 PM Tom Lane wrote: > Indeed. I tried building against 1.3.6 (mainly because it was laying > around) and the error reported by Devrim is just the tip of the iceberg. > With "make -k", I see unknown-symbol failures on > > ZSTD_CCtx_setParameter > ZSTD_c_compressionLevel

Re: should vacuum's first heap pass be read-only?

2022-03-31 Thread Robert Haas
On Thu, Mar 31, 2022 at 6:43 PM Peter Geoghegan wrote: > > The only way the conveyor belt system has any > > value is if we think that there is some set of circumstances where the > > heap scan is separated in time from the index vacuum, such that we > > might sometimes do an index vacuum without

Re: [WIP] ALTER COLUMN IF EXISTS

2022-03-31 Thread Tom Lane
"David G. Johnston" writes: > On Thu, Mar 31, 2022 at 4:39 PM Bradley Ayers > wrote: >> I'm interested in adding more ergonomics to DDL commands, in >> particular supporting IF EXISTS for ALTER TABLE … ALTER COLUMN, so >> that if a column doesn't exist the command is skipped. > At present the pr

Re: unlogged sequences

2022-03-31 Thread Robert Haas
On Thu, Mar 31, 2022 at 10:14 AM Tomas Vondra wrote: > * When linking a sequence to a table (ALTER SEQUENCE ... OWNED BY), > there's an ereport(ERROR) if the relpersistence values do not match. > > * Disallow changing persistence for owned sequences directly. Wait, what? I don't understand why we

Re: [WIP] ALTER COLUMN IF EXISTS

2022-03-31 Thread David G. Johnston
On Thu, Mar 31, 2022 at 4:39 PM Bradley Ayers wrote: > > I'm interested in adding more ergonomics to DDL commands, in > particular supporting IF EXISTS for ALTER TABLE … ALTER COLUMN, so > that if a column doesn't exist the command is skipped. > > IF EXISTS is already supported in various places

Re: [PATCH] Full support for index LP_DEAD hint bits on standby

2022-03-31 Thread Michail Nikolaev
Hello, David. Thanks for your review! > As a specific recommendation here - submit patches with a complete commit > message. > Tweak it for each new version so that any prior discussion that informed the > general design of > the patch is reflected in the commit message. Yes, agreed. Applied t

Re: [PATCH] Full support for index LP_DEAD hint bits on standby

2022-03-31 Thread Michail Nikolaev
Hello, Peter. > The simple answer is: I don't know. I could probably come up with a > better answer than that, but it would take real effort, and time. I remember you had an idea about using the LP_REDIRECT bit in btree indexes as some kind of “recently dead” flag (1). Is this idea still in progr

Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*)

2022-03-31 Thread Justin Pryzby
On Mon, Mar 14, 2022 at 09:37:25PM -0500, Justin Pryzby wrote: > The original, minimal goal of this patch was to show shared tempdirs in > pg_ls_tmpfile() - rather than hiding them misleadingly as currently happens. > 20200310183037.ga29...@telsasoft.com > 20200313131232.go29...@telsasoft.com > >

[WIP] ALTER COLUMN IF EXISTS

2022-03-31 Thread Bradley Ayers
Hi, I'm interested in adding more ergonomics to DDL commands, in particular supporting IF EXISTS for ALTER TABLE … ALTER COLUMN, so that if a column doesn't exist the command is skipped. IF EXISTS is already supported in various places (e.g. ALTER TABLE … ADD COLUMN IF NOT EXISTS, and ALTER TABLE

Re: head fails to build on SLES 12 (wal_compression=zstd)

2022-03-31 Thread Tom Lane
Justin Pryzby writes: > On Thu, Mar 31, 2022 at 11:44:40AM -0400, Tom Lane wrote: >> In view of 51c0d186d ("Allow parallel zstd compression"), I agree >> that some clarity about the minimum supported version of zstd >> seems essential. I don't want to be dealing with threading bugs >> in ancient

Re: unlogged sequences

2022-03-31 Thread David G. Johnston
On Thu, Mar 31, 2022 at 3:43 PM Tomas Vondra wrote: > On 3/31/22 22:40, David G. Johnston wrote: > > On Thu, Mar 31, 2022 at 1:05 PM Tomas Vondra > > mailto:tomas.von...@enterprisedb.com>> > > wrote: > > > > > > I agree the first part is not contentious, so shall we extract this > part > >

Re: Slow standby snapshot

2022-03-31 Thread Michail Nikolaev
Hello. Just an updated commit message. Thanks, Michail. From 934d649a18c66f8b448463e57375865b33ce53e7 Mon Sep 17 00:00:00 2001 From: nkey Date: Fri, 1 Apr 2022 02:17:55 +0300 Subject: [PATCH v5] Optimize KnownAssignedXidsGetAndSetXmin by maintaining offset to next valid xid. MIME-Version: 1.0 C

Re: should vacuum's first heap pass be read-only?

2022-03-31 Thread Peter Geoghegan
On Thu, Mar 31, 2022 at 1:25 PM Robert Haas wrote: > > I don't think we want to, exactly. Maybe it's easier to store > > redundant TIDs than to avoid storing them in the first place (we can > > probably just accept some redundancy). There is a trade-off to be made > > there. I'm not at all sure of

Re: unlogged sequences

2022-03-31 Thread Tomas Vondra
On 3/31/22 22:40, David G. Johnston wrote: > On Thu, Mar 31, 2022 at 1:05 PM Tomas Vondra > mailto:tomas.von...@enterprisedb.com>> > wrote: > > > I agree the first part is not contentious, so shall we extract this part > of the patch and get that committed for PG15? Or is that too late to

Re: head fails to build on SLES 12 (wal_compression=zstd)

2022-03-31 Thread Justin Pryzby
On Thu, Mar 31, 2022 at 11:44:40AM -0400, Tom Lane wrote: > Justin Pryzby writes: > > Possible responses look like: > > - Use 0 which also means "default" (need to verify that works across > > versions); > > - Or #ifndef ZSTD_CLEVEL_DEFAULT #define ZSTD_CLEVEL_DEFAULT 3; > > - Add a test for a

Re: pg_receivewal fail to streams when the partial file to write is not fully initialized present in the wal receiver directory

2022-03-31 Thread Cary Huang
Hello pg_receivewal creates this .partial WAL file during WAL streaming and it is already treating this file as a temporary file. It will fill this .partial file with zeroes up to 16777216 by default before streaming real WAL data on it. If your .partial file is only 8396800 bytes, then this c

Re: [PATCH] Expose port->authn_id to extensions and triggers

2022-03-31 Thread Jacob Champion
On Tue, 2022-03-29 at 23:38 +, Jacob Champion wrote: > v8 rebases over the recent SSL changes to get the cfbot green again. I think the Windows failure [1] is unrelated to this patch, but for posterity: > [03:01:58.925] c:\cirrus>call "C:/Program Files/Git/usr/bin/timeout.exe" -v > -k60s 15m

Re: A qsort template

2022-03-31 Thread Thomas Munro
On Thu, Mar 31, 2022 at 11:09 PM John Naylor wrote: > In a couple days I'm going to commit the v3 patch "accelerate tuple > sorting for common types" as-is after giving it one more look, barring > objections. Hi John, Thanks so much for all the work you've done here! I feel bad that I lobbed so

Re: Extensible Rmgr for Table AMs

2022-03-31 Thread Jeff Davis
On Mon, 2022-03-28 at 11:00 -0700, Andres Freund wrote: > I think this has been discussed before, but to me it's not obvious > that it's a > good idea to change RmgrTable from RmgrData to RmgrData *. That adds > an > indirection, without obvious benefit. I did some performance tests. I created a n

Re: Commitfest closing

2022-03-31 Thread Tom Lane
Andrew Dunstan writes: > On Mar 31, 2022, at 4:47 PM, Greg Stark wrote: >> So the last commitfest often runs over and "feature freeze" isn't >> scheduled until April 7. Do committers want to keep the commitfest >> open until then? Or close it now and focus it only on a few pending >> features th

Re: proposal: enhancing plpgsql debug API - returns text value of variable content

2022-03-31 Thread Tom Lane
Pavel Stehule writes: > I am sending updated patch After studying the list of exposed functions for awhile, it seemed to me that we should also expose exec_assign_value. The new pointers allow a plugin to compute a value in Datum+isnull format, but then it can't do much of anything with it: exec

Re: unlogged sequences

2022-03-31 Thread David G. Johnston
On Thu, Mar 31, 2022 at 1:40 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > The DBA just has to execute the ALTER SEQUENCE command on all relevant > sequences. > Additional, if we do not implement the forced matching of persistence mode, we should consider adding an "ALTER TABLE SET

Re: Higher level questions around shared memory stats

2022-03-31 Thread Andres Freund
Hi, On 2022-03-31 16:16:31 +0900, Kyotaro Horiguchi wrote: > After moving to shared stats, we might want to expose the GUC variable > itself. Then hide/remove the macro PG_STAT_TMP_DIR. This breaks the > extensions but it is better than keeping using PG_STAT_TMP_DIR for > uncertain reasons. The e

Re: Commitfest closing

2022-03-31 Thread Andrew Dunstan
> On Mar 31, 2022, at 4:47 PM, Greg Stark wrote: > > So the last commitfest often runs over and "feature freeze" isn't > scheduled until April 7. Do committers want to keep the commitfest > open until then? Or close it now and focus it only on a few pending > features they're already working

Re: Logical insert/update/delete WAL records for custom table AMs

2022-03-31 Thread Jeff Davis
On Thu, 2022-03-31 at 09:05 -0400, Robert Haas wrote: > 1. An AM that doesn't care about having anything happening during > recovery, but wants to be able to get logical decoding to do some > work. Maybe the intention of the AM is that data is available only > when the server is not in recovery and

Commitfest closing

2022-03-31 Thread Greg Stark
So the last commitfest often runs over and "feature freeze" isn't scheduled until April 7. Do committers want to keep the commitfest open until then? Or close it now and focus it only on a few pending features they're already working on? -- greg

Re: unlogged sequences

2022-03-31 Thread David G. Johnston
On Thu, Mar 31, 2022 at 1:05 PM Tomas Vondra wrote: > > I agree the first part is not contentious, so shall we extract this part > of the patch and get that committed for PG15? Or is that too late to > make such changes to the patch? > > The minimum viable feature for me, given the written goal f

Re: Keep notnullattrs in RelOptInfo (Was part of UniqueKey patch series)

2022-03-31 Thread Greg Stark
On Mon, 22 Nov 2021 at 02:14, Andy Fan wrote: > > _I_ think there is no way to bypass that. I guess Tom has a bigger plan on > Var (not only for notnull), but no time to invest in them so far. If > that is the case, > personally I think we can go ahead with my method first and continue the > re

Re: SQL/JSON: functions

2022-03-31 Thread Andrew Dunstan
On 3/31/22 15:54, Greg Stark wrote: > I see several commits referencing this entry. Can we mark it committed > or are there still chunks of commits to go? No code chunks left, only a documentation patch which should land tomorrow or Saturday. I am also planning on committing the JSON_TABLE p

Re: should vacuum's first heap pass be read-only?

2022-03-31 Thread Robert Haas
[ returning to this thread after a bit of a hiatus ] On Fri, Feb 25, 2022 at 12:15 PM Peter Geoghegan wrote: > I can only speak for myself, but that sounds correct to me. IMO what > we really want here is to create lots of options for VACUUM. I agree. That seems like a good way of thinking about

Re: Correct docs re: rewriting indexes when table rewrite is skipped

2022-03-31 Thread James Coleman
On Thu, Mar 31, 2022 at 3:25 PM Robert Haas wrote: > > On Thu, Mar 31, 2022 at 10:51 AM James Coleman wrote: > > Updated. > > This version looks fine to me. If nobody objects I will commit it and > credit myself as a co-author. Sounds great; thanks again for the review. James Coleman

Re: Pluggable toaster

2022-03-31 Thread Greg Stark
It looks like it's still not actually building on some compilers. I see a bunch of warnings as well as an error: [03:53:24.660] dummy_toaster.c:97:2: error: void function 'dummyDelete' should not return a value [-Wreturn-type] Also the "publication" regression test needs to be adjusted as it incl

Re: Temporary tables versus wraparound... again

2022-03-31 Thread Greg Stark
I've updated the patches. Adding the assertion actually turned up a corner case where RecentXmin was *not* set. If you lock a temporary table and that's the only thing you do in a transaction then the flag is set indicating you've used the temp schema but you never take a snapshot :( I also split

Re: unlogged sequences

2022-03-31 Thread Tomas Vondra
On 3/31/22 21:55, David G. Johnston wrote: > On Thu, Mar 31, 2022 at 12:36 PM Tomas Vondra > mailto:tomas.von...@enterprisedb.com>> > wrote: > > On 3/31/22 19:35, David G. Johnston wrote: > > On Thu, Mar 31, 2022 at 9:28 AM Andres Freund > >

Re: head fails to build on SLES 12

2022-03-31 Thread Larry Rosenman
On 03/31/2022 2:58 pm, Andrew Dunstan wrote: On 3/31/22 10:23, Devrim Gündüz wrote: Hi, Latest snapshot tarball fails to build on SLES 12.5, which uses GCC 4.8-8. Build log is attached. Please let me know if you want me to provide more info. AFAICT we don't have any buildfarm animals curre

Re: head fails to build on SLES 12

2022-03-31 Thread Andrew Dunstan
On 3/31/22 10:23, Devrim Gündüz wrote: > Hi, > > Latest snapshot tarball fails to build on SLES 12.5, which uses GCC > 4.8-8. Build log is attached. > > Please let me know if you want me to provide more info. > AFAICT we don't have any buildfarm animals currently reporting on SLES 12 (and the o

Re: unlogged sequences

2022-03-31 Thread David G. Johnston
On Thu, Mar 31, 2022 at 12:36 PM Tomas Vondra wrote: > On 3/31/22 19:35, David G. Johnston wrote: > > On Thu, Mar 31, 2022 at 9:28 AM Andres Freund > > wrote: > > > > I agree it makes sense to have logged sequences with unlogged > tables. We > > should call out

Re: SQL/JSON: functions

2022-03-31 Thread Greg Stark
I see several commits referencing this entry. Can we mark it committed or are there still chunks of commits to go?

Re: unlogged sequences

2022-03-31 Thread Tomas Vondra
On 3/31/22 19:35, David G. Johnston wrote: > On Thu, Mar 31, 2022 at 9:28 AM Andres Freund > wrote: > > I agree it makes sense to have logged sequences with unlogged tables. We > should call out the behavioural change somewhere prominent in the > release >

Re: Correct docs re: rewriting indexes when table rewrite is skipped

2022-03-31 Thread Robert Haas
On Thu, Mar 31, 2022 at 10:51 AM James Coleman wrote: > Updated. This version looks fine to me. If nobody objects I will commit it and credit myself as a co-author. -- Robert Haas EDB: http://www.enterprisedb.com

Re: jsonpath syntax extensions

2022-03-31 Thread Nikita Malakhov
Hi, Ok, we'll rebase it onto actual master for the next iteration. Thank you! On Thu, Mar 31, 2022 at 10:17 PM Greg Stark wrote: > Well I still think this would be a good candidate to get reviewed. > > But it currently needs a rebase and it's the last day of the CF so I > guess it'll get moved f

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-31 Thread Robert Haas
On Thu, Mar 31, 2022 at 2:44 PM Andres Freund wrote: > On 2022-03-31 14:31:43 -0400, Robert Haas wrote: > > On Thu, Mar 31, 2022 at 12:25 PM Andres Freund wrote: > > > > Andres, thoughts? Do you want me to polish and commit 0001? > > > > > > Yes please! > > > > Here is a polished version. Comment

Re: jsonpath syntax extensions

2022-03-31 Thread Greg Stark
Well I still think this would be a good candidate to get reviewed. But it currently needs a rebase and it's the last day of the CF so I guess it'll get moved forward again. I don't think "returned with feedback" is helpful given there's been basically no feedback :(

Re: minor gripe about lax reloptions parsing for views

2022-03-31 Thread Greg Stark
The patch is currently not applying. And it looks like there hasn't been any discussion since Alvaro's comments last december. I'm marking the patch Returned with Feedback. On Fri, 24 Dec 2021 at 16:49, Alvaro Herrera wrote: > > On 2021-Dec-21, Mark Dilger wrote: > > > Rebased patch attached: >

Re: [PATCH] pgbench: add multiconnect option

2022-03-31 Thread Greg Stark
According to the cfbot this patch needs a rebase

Re: ORDER BY pushdowns seem broken in postgres_fdw

2022-03-31 Thread Tom Lane
Ronan Dunklau writes: > Le jeudi 31 mars 2022, 01:41:37 CEST Tom Lane a écrit : >> If no objections, I think this is committable. > No objections on my end. Pushed. regards, tom lane

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-31 Thread Andres Freund
On 2022-03-31 14:31:43 -0400, Robert Haas wrote: > On Thu, Mar 31, 2022 at 12:25 PM Andres Freund wrote: > > > Andres, thoughts? Do you want me to polish and commit 0001? > > > > Yes please! > > Here is a polished version. Comments? LGTM.

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-31 Thread Andres Freund
Hi, On 2022-03-30 12:58:26 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2022-03-30 12:34:34 -0400, Tom Lane wrote: > >> One refinement that comes to mind as I look at the patch is to distinguish > >> between "check" and "installcheck". Not sure that's worthwhile, but not > >> sure it is

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-31 Thread Andrew Dunstan
On 3/31/22 12:45, Tom Lane wrote: > > On looking closer, the combination of --config-auth and --create-role > *only* fixes the config files for SSPI, it doesn't expect the server > to be running. > > I agree that the documentation of this is nonexistent and the design > is probably questionable,

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-31 Thread Robert Haas
On Thu, Mar 31, 2022 at 12:25 PM Andres Freund wrote: > > Andres, thoughts? Do you want me to polish and commit 0001? > > Yes please! Here is a polished version. Comments? > FWIW, once the freeze is done I'm planning to set up scripting to see which > parts of the code we whacked around don't ha

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-31 Thread Andrew Dunstan
On 3/31/22 14:12, Robert Haas wrote: > On Thu, Mar 31, 2022 at 12:56 PM Robert Haas wrote: >> I agree. That's exactly what I said in >> http://postgr.es/m/CA+TgmoasOhqLR=tsymhd4tyx-qnfwtde_u19zphkunpsckh...@mail.gmail.com >> ... > OK, so I pushed a commit adding that incantation to the test scri

Re: Unit tests for SLRU

2022-03-31 Thread Daniel Gustafsson
> On 31 Mar 2022, at 16:30, Aleksander Alekseev > wrote: Thanks for hacking on increasing test coverage! > While on it, I moved the Asserts() outside of SimpleLruInit(). It didn't seem > to be a right place to check the IsUnderPostmaster value, and complicated the > test implementation. + * +

Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations

2022-03-31 Thread Peter Geoghegan
On Thu, Mar 31, 2022 at 10:50 AM Andres Freund wrote: > > So, to be clear: vac_update_relstats() never actually considered the > > new relfrozenxid value from its vacuumlazy.c caller to be "in the > > future"? > > No, I added separate debug messages for those, and also applied your patch, > and it

Re: [PATCH] Accept IP addresses in server certificate SANs

2022-03-31 Thread Jacob Champion
On Thu, 2022-03-31 at 16:32 +0200, Peter Eisentraut wrote: > Why add a (failry complicated) pg_inet_pton() when a perfectly > reasonable inet_pton() exists? I think it was mostly just that inet_aton() and pg_inet_net_ntop() both had ports, and I figured I might as well port the other one since we

  1   2   >