Re: Fix GUC_NO_SHOW_ALL test scenario in 003_check_guc.pl

2023-02-07 Thread Michael Paquier
On Mon, Feb 06, 2023 at 04:23:02PM +0900, Michael Paquier wrote: > On top of that, I have noticed an extra combination that would not > make sense and that could be checked with the SQL queries: > GUC_DISALLOW_IN_FILE implies GUC_NOT_IN_SAMPLE. The opposite may not > be true, though, as some devel

ICU locale validation / canonicalization

2023-02-07 Thread Jeff Davis
Right now, ICU locales are not validated: initdb ... --locale-provider=icu --icu-locale=anything CREATE COLLATION foo (PROVIDER=icu, LOCALE='anything'); CREATE DATABASE anythingdb ICU_LOCALE 'anything'; all succeed. We do check that the value is accepted by ICU, but ICU seems to accept a

RE: Exit walsender before confirming remote flush in logical replication

2023-02-07 Thread Hayato Kuroda (Fujitsu)
Dear Amit, Thanks for giving comments! > > > > 0002: > > > > This patch doesn't seem to offer a means to change the default > > walsender behavior. We need a subscription option named like > > "walsender_exit_mode" to do that. > > > > I don't think at this stage we need a subscription-level opt

Re: A bug in make_outerjoininfo

2023-02-07 Thread Richard Guo
On Wed, Feb 8, 2023 at 1:55 PM Richard Guo wrote: > > On Wed, Feb 8, 2023 at 7:33 AM Tom Lane wrote: > >> We might want to see if we can devise a new example (or wait for >> Robins to break it ;-)) before expending a lot of effort on making >> the commute_xxx bits more precise. > > > Here is an

Re: recovery modules

2023-02-07 Thread Michael Paquier
On Sat, Feb 04, 2023 at 10:14:36AM -0800, Nathan Bossart wrote: > On Sat, Feb 04, 2023 at 11:59:20AM +0900, Michael Paquier wrote: >> + ArchiveModuleCallbacks struct filled with the callback function pointers >> for >> This needs a structname markup. >> >> + can use state->private_data to sto

Re: Time delayed LR (WAS Re: logical replication restrictions)

2023-02-07 Thread Peter Smith
Here are my review comments for v31-0001 == doc/src/sgml/glossary.sgml 1. + + Replication setup that applies time-delayed copy of the data. + That sentence seemed a bit strange to me. SUGGESTION Replication setup that delays the application of changes by a specified minimum ti

Re: Generating code for query jumbling through gen_node_support.pl

2023-02-07 Thread Michael Paquier
On Tue, Feb 07, 2023 at 11:01:03PM -0800, Andres Freund wrote: > Given that we already pay the price of multiple regress runs, and that > jumbling is now really a core feature, perhaps we should enable > pg_stat_statements in pg_upgrade or 027_stream_regress.pl? I'd hope it > wouldn't add a meaning

Re: [Proposal] Add foreign-server health checks infrastructure

2023-02-07 Thread Katsuragi Yuta
On 2023-01-27 15:57, Hayato Kuroda (Fujitsu) wrote: I found cfbot failure, PSA fixed version. Sorry for noise. Best Regards, Hayato Kuroda FUJITSU LIMITED Hi Kuroda-san, Thank you for updating the patch! Sorry for the late reply. 0001: + while (result < 0 && errno == EINTR); + +

Re: Cygwin cleanup

2023-02-07 Thread Thomas Munro
On Fri, Jan 13, 2023 at 5:17 PM Justin Pryzby wrote: > My patch used fsync_fname_ext() which would cause an ERROR rather than a > PANIC when failing to fsync the logical decoding pathname. FTR While analysing a lot of CI logs trying to debug something else I came across a plain Windows/MSVC (not

Re: deadlock-hard flakiness

2023-02-07 Thread Andres Freund
Hi, On 2023-02-07 17:10:21 -0800, Andres Freund wrote: > So far the diff always is: > > diff -U3 /tmp/cirrus-ci-build/src/test/isolation/expected/deadlock-hard.out > /tmp/cirrus-ci-build/build/testrun/isolation-running/isolation/results/deadlock-hard.out > --- /tmp/cirrus-ci-build/src/test/isola

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2023-02-07 Thread Kyotaro Horiguchi
At Tue, 7 Feb 2023 22:38:14 -0800, Andres Freund wrote in > Hi, > > I did another read through the series. I do have some minor changes, but > they're minor. I think this is ready for commit. I plan to start pushing > tomorrow. > > The changes I made are: > - the tablespace test changes didn't

Re: Generating code for query jumbling through gen_node_support.pl

2023-02-07 Thread Andres Freund
Hi, On 2023-02-08 15:47:51 +0900, Michael Paquier wrote: > This one was intentional to let extensions play with jumbling of such > nodes, but perhaps you are right that it makes little sense at this > stage. If there is an ask for it later, though.. Using > shared_preload_libraries = pg_stat_sta

Re: Generating code for query jumbling through gen_node_support.pl

2023-02-07 Thread Michael Paquier
On Tue, Feb 07, 2023 at 05:32:07PM -0500, Tom Lane wrote: > I have just noticed that this patch is generating useless jumbling > code for node types such as Path nodes and other planner infrastructure > nodes. That no doubt contributes to the miserable code coverage rating > for queryjumblefuncs.*

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2023-02-07 Thread Andres Freund
Hi, I did another read through the series. I do have some minor changes, but they're minor. I think this is ready for commit. I plan to start pushing tomorrow. The changes I made are: - the tablespace test changes didn't quite work in isolation / needed a bit of polishing - moved the tablespace

Re: possible proposal plpgsql GET DIAGNOSTICS oid = PG_ROUTINE_OID

2023-02-07 Thread Julien Rouhaud
On Tue, Feb 07, 2023 at 08:48:22PM +0100, Pavel Stehule wrote: > > I have a question about the possibility of simply getting the name of the > currently executed function. The reason for this request is simplification > of writing debug messages. > > GET DIAGNOSTICS _oid = PG_ROUTINE_OID; > RAISE N

Re: A bug in make_outerjoininfo

2023-02-07 Thread Richard Guo
On Wed, Feb 8, 2023 at 7:33 AM Tom Lane wrote: > We might want to see if we can devise a new example (or wait for > Robins to break it ;-)) before expending a lot of effort on making > the commute_xxx bits more precise. Here is an example that can trigger the same assertion as in bug #17781 wit

Re: Worth using personality(ADDR_NO_RANDOMIZE) for EXEC_BACKEND on linux?

2023-02-07 Thread Andres Freund
On 2023-02-08 13:12:15 +0900, Michael Paquier wrote: > On Thu, Feb 02, 2023 at 11:14:39AM +0900, Michael Paquier wrote: > > Actually, I completely forgot to take into account that there is a > > minor release planned for next week: > > https://www.postgresql.org/developer/roadmap/ > > > > So I'll

Re: Exit walsender before confirming remote flush in logical replication

2023-02-07 Thread Amit Kapila
On Wed, Feb 8, 2023 at 7:57 AM Kyotaro Horiguchi wrote: > > I agree to the direction and thanks for the patch. > > At Tue, 7 Feb 2023 17:08:54 +, "Hayato Kuroda (Fujitsu)" > wrote in > > > I noticed that previous ones are rejected by cfbot, even if they passed > > > on my > > > environment.

Re: Logical replication timeout problem

2023-02-07 Thread Andres Freund
Hi, On 2023-02-03 10:13:54 +0530, Amit Kapila wrote: > I am planning to push this to HEAD sometime next week (by Wednesday). > To backpatch this, we need to fix it in some non-standard way, like > without introducing a callback which I am not sure is a good idea. If > some other committers vote to

Re: Improve WALRead() to suck data directly from WAL buffers when possible

2023-02-07 Thread Dilip Kumar
On Wed, Feb 8, 2023 at 9:57 AM Bharath Rupireddy wrote: > > I can also do a few other things, but before working on them, I'd like > to hear from others: > 1. A separate wait event (WAIT_EVENT_WAL_READ_FROM_BUFFERS) for > reading from WAL buffers - right now, WAIT_EVENT_WAL_READ is being > used bo

Re: Assertion failure in SnapBuildInitialSnapshot()

2023-02-07 Thread Amit Kapila
On Wed, Feb 8, 2023 at 1:35 AM Andres Freund wrote: > > On 2023-02-07 11:49:03 -0800, Andres Freund wrote: > > On 2023-02-01 11:23:57 +0530, Amit Kapila wrote: > > > On Tue, Jan 31, 2023 at 6:08 PM Masahiko Sawada > > > wrote: > > > > > > > > Attached updated patches. > > > > > > > > > > Thanks,

Re: OpenSSL 3.0.0 vs old branches

2023-02-07 Thread Tom Lane
Michael Paquier writes: > On Tue, Feb 07, 2023 at 01:28:26PM -0500, Tom Lane wrote: >> I think Peter's misremembering the history, and OpenSSL 3 *is* >> supported in these branches. There could be an argument for >> not back-patching f0d2c65f17 on the grounds that pre-1.1.1 is >> also supported t

Re: Improve WALRead() to suck data directly from WAL buffers when possible

2023-02-07 Thread Bharath Rupireddy
On Tue, Feb 7, 2023 at 4:12 PM Dilip Kumar wrote: > > On Mon, Dec 26, 2022 at 2:20 PM Bharath Rupireddy > wrote: > > I have gone through this patch, I have some comments (mostly cosmetic > and comments) Thanks a lot for reviewing. > From the above comments, it appears that we are reading from t

Re: OpenSSL 3.0.0 vs old branches

2023-02-07 Thread Michael Paquier
On Tue, Feb 07, 2023 at 01:28:26PM -0500, Tom Lane wrote: > I double-checked this on Fedora 37 (openssl 3.0.5). v11 and v12 > do build --with-openssl. There are an annoyingly large number of > -Wdeprecated-declarations warnings, but those are there in v13 too. > I confirm that back-patching f0d2c

Re: Assertion failure in SnapBuildInitialSnapshot()

2023-02-07 Thread Amit Kapila
On Wed, Feb 8, 2023 at 1:19 AM Andres Freund wrote: > > On 2023-02-01 11:23:57 +0530, Amit Kapila wrote: > > On Tue, Jan 31, 2023 at 6:08 PM Masahiko Sawada > > wrote: > > > > > > Attached updated patches. > > > > > > > Thanks, Andres, others, do you see a better way to fix this problem? I > > h

Re: Worth using personality(ADDR_NO_RANDOMIZE) for EXEC_BACKEND on linux?

2023-02-07 Thread Michael Paquier
On Thu, Feb 02, 2023 at 11:14:39AM +0900, Michael Paquier wrote: > Actually, I completely forgot to take into account that there is a > minor release planned for next week: > https://www.postgresql.org/developer/roadmap/ > > So I'll hold on a bit longer here, until the next versions get their > ta

RE: Data is copied twice when specifying both child and parent table in publication

2023-02-07 Thread wangw.f...@fujitsu.com
On Wed, Feb 8, 2023 4:29 AM Andres Freund wrote: > Hi, > > On 2022-11-16 08:58:31 +, wangw.f...@fujitsu.com wrote: > > Attach the new patch set. > > This patch causes several of the tests to fail. See e.g.: > > https://cirrus-ci.com/task/6587624765259776 > > Most of the failures appear to

Re: Missing TAG for FEB (current) Minor Version Release

2023-02-07 Thread Tom Lane
Justin Pryzby writes: > On Tue, Feb 07, 2023 at 11:14:48AM +, sujit.rat...@fujitsu.com wrote: >> Could you please confirm when we can expect the TAG created for all minor >> versions? > You might be interested to read this earlier question: > https://www.postgresql.org/message-id/flat/2e5676

Re: windows CI failing PMSignalState->PMChildFlags[slot] == PM_CHILD_ASSIGNED

2023-02-07 Thread Thomas Munro
On Wed, Feb 8, 2023 at 4:00 PM Thomas Munro wrote: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=fairywren&dt=2021-08-12%2010:38:56 > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=fairywren&dt=2021-09-28%2016:40:49 These were a bit different though. They also logged "could

Normalization of utility queries in pg_stat_statements

2023-02-07 Thread Michael Paquier
Hi all, (Adding Bertrand in CC.) $subject is a follow-up of the automation of query jumbling for utilities and DDLs, and attached is a set of patches that apply normalization to DDL queries across the board, for all utilities. This relies on tracking the location of A_Const nodes while removing f

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

2023-02-07 Thread wangw.f...@fujitsu.com
On Tue, Feb 7, 2023 15:37 PM Amit Kapila wrote: > On Tue, Feb 7, 2023 at 12:41 PM Masahiko Sawada > wrote: > > > > On Fri, Feb 3, 2023 at 6:44 PM Amit Kapila wrote: > > > > > We need to think of a predictable > > > way to test this path which may not be difficult. But I guess it would > > > be b

Re: windows CI failing PMSignalState->PMChildFlags[slot] == PM_CHILD_ASSIGNED

2023-02-07 Thread Thomas Munro
On Wed, Feb 8, 2023 at 2:52 PM Thomas Munro wrote: > On Wed, Feb 8, 2023 at 2:28 PM Andres Freund wrote: > > TRAP: failed Assert("PMSignalState->PMChildFlags[slot] == > > PM_CHILD_ASSIGNED"), File: "../src/backend/storage/ipc/pmsignal.c", Line: > > 329, PID: 5948 I was wondering if commit 18a4

Difference of ecpg japanese translation in PG15

2023-02-07 Thread Sho Kato (Fujitsu)
Hello In PG15, ecpg japanese translation are different from other branches. Is there a reason for this? If not, I think it would be better to make it the same as the other branch like the attached patch. regards, sho kato update-japanese-translation.patch Description: update-japanese-translati

Re: tests against running server occasionally fail, postgres_fdw & tenk1

2023-02-07 Thread Andres Freund
Hi, On 2023-02-06 17:53:00 -0800, Andres Freund wrote: > Another run hit an issue we've been fighting repeatedly on the buildfarm / CI: > https://cirrus-ci.com/task/5527490404286464 > https://api.cirrus-ci.com/v1/artifact/task/5527490404286464/testrun/build/testrun/regress-running/regress/regressi

Re: Add LZ4 compression in pg_dump

2023-02-07 Thread Justin Pryzby
On Tue, Jan 31, 2023 at 09:00:56AM +, gkokola...@pm.me wrote: > > In my mind, three things here are misleading, because it doesn't use > > gzip headers: > > > > | GzipCompressorState, DeflateCompressorGzip, "gzip compressed". > > > > This comment is about exactly that: > > > > * underlying s

Re: Exit walsender before confirming remote flush in logical replication

2023-02-07 Thread Kyotaro Horiguchi
I agree to the direction and thanks for the patch. At Tue, 7 Feb 2023 17:08:54 +, "Hayato Kuroda (Fujitsu)" wrote in > > I noticed that previous ones are rejected by cfbot, even if they passed on > > my > > environment... > > PSA fixed version. > > While analyzing more, I found the furthe

Re: Missing TAG for FEB (current) Minor Version Release

2023-02-07 Thread Justin Pryzby
On Tue, Feb 07, 2023 at 11:14:48AM +, sujit.rat...@fujitsu.com wrote: > Hi OSS Community, > We just wanted to confirm when the TAG will be created for the current FEB > minor release as we could not find the TAG for none of the minor versions, > below is the screen shot for the some of the min

Re: heapgettup refactoring

2023-02-07 Thread David Rowley
On Wed, 8 Feb 2023 at 09:41, Melanie Plageman wrote: > > On Tue, Feb 07, 2023 at 05:40:13PM +1300, David Rowley wrote: > > I ended up adjusting HeapScanDescData more than what is minimally > > required to remove rs_inited. I wondered if rs_cindex should be closer > > to rs_cblock in the struct so

Re: Add index scan progress to pg_stat_progress_vacuum

2023-02-07 Thread Imseih (AWS), Sami
Hi, Thanks for your reply! I addressed the latest comments in v23. 1/ cleaned up the asserts as discussed. 2/ used pq_putmessage to send the message on index scan completion. Thanks -- Sami Imseih Amazon Web Services (AWS) v23-0001-Add-2-new-columns-to-pg_stat_progress_vacuum.-Th.patch Desc

Re: windows CI failing PMSignalState->PMChildFlags[slot] == PM_CHILD_ASSIGNED

2023-02-07 Thread Thomas Munro
On Wed, Feb 8, 2023 at 2:28 PM Andres Freund wrote: > 2023-02-08 00:53:20.257 GMT client backend[4584] pg_regress/rangetypes > STATEMENT: select '-[a,z)'::textrange; > TRAP: failed Assert("PMSignalState->PMChildFlags[slot] == > PM_CHILD_ASSIGNED"), File: "../src/backend/storage/ipc/pmsignal.c",

windows CI failing PMSignalState->PMChildFlags[slot] == PM_CHILD_ASSIGNED

2023-02-07 Thread Andres Freund
Hi, A recent cfbot run caused CI on windows to crash - on a patch that could not conceivably cause this issue: https://cirrus-ci.com/task/564602116576 the patch is just: https://github.com/postgresql-cfbot/postgresql/commit/dbd4afa6e7583c036b86abe2e3d27b508d335c2b regression.diffs: http

deadlock-hard flakiness

2023-02-07 Thread Andres Freund
Hi, On cfbot / CI, we've recently seen a lot of spurious test failures due to src/test/isolation/specs/deadlock-hard.spec changing output. Always on freebsd, when running tests against a pre-existing instance. I'm fairly sure I've seen this failure on the buildfarm as well, but I'm too impatient

Re: RLS makes COPY TO process child tables

2023-02-07 Thread Stephen Frost
Greetings, * Yugo NAGATA (nag...@sraoss.co.jp) wrote: > On Wed, 01 Feb 2023 11:47:23 -0500 > Tom Lane wrote: > > > Yugo NAGATA writes: > > > Antonin Houska wrote: > > >> While working on [1] I noticed that if RLS gets enabled, the COPY TO > > >> command > > >> includes the contents of child t

Re: make_ctags: use -I option to ignore pg_node_attr macro

2023-02-07 Thread Tatsuo Ishii
>> I am not sure if this is good way to check if ctags supports "-e" or not. >> >> +thenctags --version 2>&1 | grep -- -e >/dev/null >> >> Perhaps, "--help" might be intended rather than "--version" to check >> supported options? > > Yeah, that was my mistake. > >> Even so, ctags woul

Re: make_ctags: use -I option to ignore pg_node_attr macro

2023-02-07 Thread Tatsuo Ishii
>> The patch drops support for "-n" option :-< >> >> Attached is the patch by fixing make_ctags (make_etags is not >> touched). >> >> If Exuberant-type ctags is available, use it (not changed). >> If Exuberant-type ctags is not available, try old ctags (not changed). >> If the old ctags doe

Re: A bug in make_outerjoininfo

2023-02-07 Thread Tom Lane
I wrote: > Richard Guo writes: >> In b448f1c8 remove_useless_result_rtes will remove useless FromExprs and >> merge its quals up to parent. This makes flag 'delay_upper_joins' not >> necessary any more if the clauses between the two outer joins come from >> FromExprs. However, if the clauses bet

Re: Generating code for query jumbling through gen_node_support.pl

2023-02-07 Thread Tom Lane
Michael Paquier writes: > With all that in mind, I have spent my day polishing that and doing a > close lookup, and the patch has been applied. Thanks a lot! I have just noticed that this patch is generating useless jumbling code for node types such as Path nodes and other planner infrastructure

Re: daitch_mokotoff module

2023-02-07 Thread Tomas Vondra
On 2/7/23 18:08, Paul Ramsey wrote: > > >> On Feb 7, 2023, at 6:47 AM, Dag Lem wrote: >> >> I just went by to check the status of the patch, and I noticed that >> you've added yourself as reviewer earlier - great! >> >> Please tell me if there is anything I can do to help bring this across >> th

Re: Non-superuser subscription owners

2023-02-07 Thread Robert Haas
On Wed, Feb 1, 2023 at 4:02 PM Andres Freund wrote: > On 2023-01-30 15:32:34 -0500, Robert Haas wrote: > > I had a long think about what to do with ALTER SUBSCRIPTION ... OWNER > > TO in terms of permissions checks. > > As long as owner and run-as are the same, I think it's strongly > preferrable

Re: Too coarse predicate locks granularity for B+ tree indexes

2023-02-07 Thread Thomas Munro
On Wed, Feb 8, 2023 at 10:44 AM Thomas Munro wrote: > On Wed, Feb 8, 2023 at 5:25 AM Andrey Borodin wrote: > > On Tue, Feb 7, 2023 at 4:01 AM Rinat Shigapov > > wrote: > > > Thomas, thank you for the details! > > > > > > Have you kept the branch that you used to generate the patch? Which > > >

Re: Too coarse predicate locks granularity for B+ tree indexes

2023-02-07 Thread Thomas Munro
On Wed, Feb 8, 2023 at 5:25 AM Andrey Borodin wrote: > On Tue, Feb 7, 2023 at 4:01 AM Rinat Shigapov wrote: > > Thomas, thank you for the details! > > > > Have you kept the branch that you used to generate the patch? Which commit > > should the patch apply to? > > You can try something like > gi

Re: possible proposal plpgsql GET DIAGNOSTICS oid = PG_ROUTINE_OID

2023-02-07 Thread Kirk Wolak
On Tue, Feb 7, 2023 at 2:49 PM Pavel Stehule wrote: > Hi > > I have a question about the possibility of simply getting the name of the > currently executed function. The reason for this request is simplification > of writing debug messages. > > GET DIAGNOSTICS _oid = PG_ROUTINE_OID; > RAISE NOTIC

Re: heapgettup refactoring

2023-02-07 Thread Melanie Plageman
On Tue, Feb 07, 2023 at 05:40:13PM +1300, David Rowley wrote: > On Fri, 3 Feb 2023 at 15:26, David Rowley wrote: > > I've pushed all but the final 2 patches now. > > I just pushed the final patch in the series. Cool! > I held back on moving the setting of rs_inited back into the > heapgettup_in

Re: Data is copied twice when specifying both child and parent table in publication

2023-02-07 Thread Andres Freund
Hi, On 2022-11-16 08:58:31 +, wangw.f...@fujitsu.com wrote: > Attach the new patch set. This patch causes several of the tests to fail. See e.g.: https://cirrus-ci.com/task/6587624765259776 Most of the failures appear to be due to the main regression tests failing: https://api.cirrus-ci.com

Re: SLRUs in the main buffer pool - Page Header definitions

2023-02-07 Thread Andres Freund
Hi, On 2023-02-06 19:12:47 +, Bagga, Rishu wrote: > Rebased patch as per latest community changes since last email. This version doesn't actually build. https://cirrus-ci.com/task/4512310190931968 [19:43:20.131] FAILED: src/test/modules/test_slru/test_slru.so.p/test_slru.c.o [19:43:20.131

Re: pglz compression performance, take two

2023-02-07 Thread Andres Freund
Hi, On 2023-02-05 10:36:39 -0800, Andrey Borodin wrote: > On Fri, Jan 6, 2023 at 10:02 PM Andrey Borodin wrote: > > > > Hello! Please find attached v8. > > I got some interesting feedback from some patch users. > There was an oversight that frequently yielded results that are 1,2 or > 3 bytes lon

Re: A bug in make_outerjoininfo

2023-02-07 Thread Tom Lane
Richard Guo writes: > In cases where we have any clauses between two outer joins, these > clauses should be treated as degenerate clauses in the upper OJ, and > they may prevent us from re-ordering the two outer joins. Previously we > have the flag 'delay_upper_joins' to help avoid the re-orderin

Re:pg_stat_statements and "IN" conditions

2023-02-07 Thread Sergei Kornilov
Hello! Unfortunately, rebase is needed again due to recent changes in queryjumblefuncs ( 9ba37b2cb6a174b37fc51d0649ef73e56eae27fc ) It seems a little strange to me that with const_merge_threshold = 1, such a test case gives the same result as with const_merge_threshold = 2 select pg_stat_state

Re: improving user.c error messages

2023-02-07 Thread Nathan Bossart
On Fri, Jan 27, 2023 at 03:15:07PM -0800, Nathan Bossart wrote: > One thing that feels a bit odd is how some of the DETAILs mention the > operation being attempted while others do not. For example, we have > > ERROR: permission denied to drop role > DETAIL: You must have SUPERUSER pr

Re: Assertion failure in SnapBuildInitialSnapshot()

2023-02-07 Thread Andres Freund
Hi, On 2023-02-07 11:49:03 -0800, Andres Freund wrote: > On 2023-02-01 11:23:57 +0530, Amit Kapila wrote: > > On Tue, Jan 31, 2023 at 6:08 PM Masahiko Sawada > > wrote: > > > > > > Attached updated patches. > > > > > > > Thanks, Andres, others, do you see a better way to fix this problem? I > >

Re: Assertion failure in SnapBuildInitialSnapshot()

2023-02-07 Thread Andres Freund
Hi, On 2023-02-01 11:23:57 +0530, Amit Kapila wrote: > On Tue, Jan 31, 2023 at 6:08 PM Masahiko Sawada wrote: > > > > Attached updated patches. > > > > Thanks, Andres, others, do you see a better way to fix this problem? I > have reproduced it manually and the steps are shared at [1] and > Sawada

possible proposal plpgsql GET DIAGNOSTICS oid = PG_ROUTINE_OID

2023-02-07 Thread Pavel Stehule
Hi I have a question about the possibility of simply getting the name of the currently executed function. The reason for this request is simplification of writing debug messages. GET DIAGNOSTICS _oid = PG_ROUTINE_OID; RAISE NOTICE '... % ... %', _oid, _oid::regproc::text; The advantage of this d

Re: OpenSSL 3.0.0 vs old branches

2023-02-07 Thread Tom Lane
Andrew Dunstan writes: > On 2023-02-07 Tu 02:18, Peter Eisentraut wrote: >> This is not the only patch that we did to support OpenSSL 3.0.0. There >> was a very lengthy discussion that resulted in various patches.  >> Unless we have a complete analysis of what was done and how it affects >> var

Re: [PATCH] Make ON CONFLICT DO NOTHING and ON CONFLICT DO UPDATE consistent

2023-02-07 Thread Andres Freund
Hi, On 2023-01-26 13:07:08 +0300, Aleksander Alekseev wrote: > > It *certainly* can't be right to just continue with the update in > > heap_update, > > I see no reason why. What makes this case so different from updating a > tuple created by the previous command? To me it's a pretty fundamental

Re: How to solve "too many Lwlocks taken"?

2023-02-07 Thread Andres Freund
Hi, On 2023-02-07 22:16:36 +0800, jack...@gmail.com wrote: > > I'm trying to write am table_am extension. But I get "too many Lwlocks taken" > after I insert > too many tuples. So I try to use UnLockBuffers() everywhere; but it still > give me "too many Lwlocks taken", > So how should I releas

Re: Can we let extensions change their dumped catalog schemas?

2023-02-07 Thread Jacob Champion
On Tue, Jan 17, 2023 at 3:18 PM Jacob Champion wrote: > As a concrete example, Timescale's extension control file could look > like this: > > default_version = '2.x.y' > module_pathname = '$libdir/timescaledb-2.x.y' > ... > dump_version = true > > which would then cause pg_dump to

Re: Reduce timing overhead of EXPLAIN ANALYZE using rdtsc?

2023-02-07 Thread Andres Freund
Hi, On 2023-01-24 14:30:34 +0100, David Geier wrote: > Attached is v7 of the patch: > > - Rebased on latest master (most importantly on top of the int64 instr_time > commits). - Includes two commits from Andres which introduce > INSTR_TIME_SET_SECONDS(), INSTR_TIME_IS_LT() and WIP to report > pg_

Re: generic plans and "initial" pruning

2023-02-07 Thread Andres Freund
Hi, On 2023-02-03 22:01:09 +0900, Amit Langote wrote: > I've added a test case under src/modules/delay_execution by adding a > new ExecutorStart_hook that works similarly as > delay_execution_planner(). The test works by allowing a concurrent > session to drop an object being referenced in a cach

Re: Speed up transaction completion faster after many relations are accessed in a transaction

2023-02-07 Thread Andres Freund
Hi, On 2023-01-24 16:57:37 +1300, David Rowley wrote: > I've attached a rebased patch. Looks like there's some issue causing tests to fail probabilistically: https://cirrus-ci.com/github/postgresql-cfbot/postgresql/commitfest%2F42%2F3501 Several failures are when testing a 32bit build. > Whi

Re: run pgindent on a regular basis / scripted manner

2023-02-07 Thread Jelte Fennema
> On Mon, Feb 6, 2023 at 10:21 AM Andrew Dunstan wrote: > > Here's a quick patch for 1 and 3. Would also need to adjust the docco. > > > > This time with patch. When supplying the --commit flag it still formats all files for me. I was able to fix that by replacing: # no non-option arguments given

RE: Exit walsender before confirming remote flush in logical replication

2023-02-07 Thread Hayato Kuroda (Fujitsu)
> I noticed that previous ones are rejected by cfbot, even if they passed on my > environment... > PSA fixed version. While analyzing more, I found the further bug that forgets initialization. PSA new version that could be passed automated tests on my github repository. Sorry for noise. Best Rega

Re: daitch_mokotoff module

2023-02-07 Thread Paul Ramsey
> On Feb 7, 2023, at 6:47 AM, Dag Lem wrote: > > I just went by to check the status of the patch, and I noticed that > you've added yourself as reviewer earlier - great! > > Please tell me if there is anything I can do to help bring this across > the finish line. Honestly, I had set it to Re

Re: A problem in deconstruct_distribute_oj_quals

2023-02-07 Thread Tom Lane
Richard Guo writes: > On Tue, Feb 7, 2023 at 2:12 PM Tom Lane wrote: >> I don't see any change in this query plan when I remove that code, so >> I'm not sure you're explaining your point very well. > To observe an obvious plan change, we can add unique constraint for 'a' > and look how outer-joi

Re: run pgindent on a regular basis / scripted manner

2023-02-07 Thread Robert Haas
On Tue, Feb 7, 2023 at 11:32 AM Jelte Fennema wrote: > On Tue, 7 Feb 2023 at 17:11, Robert Haas wrote: > > I don't know if that works or not, but it does seem plausible, at > > least. My idea would have been to use the --name-status option, which > > works for both git diff and git show. You just

Re: run pgindent on a regular basis / scripted manner

2023-02-07 Thread Jelte Fennema
On Tue, 7 Feb 2023 at 17:11, Robert Haas wrote: > I don't know if that works or not, but it does seem plausible, at > least. My idea would have been to use the --name-status option, which > works for both git diff and git show. You just look and see which > lines in the output start with M or A an

Re: Too coarse predicate locks granularity for B+ tree indexes

2023-02-07 Thread Andrey Borodin
On Tue, Feb 7, 2023 at 4:01 AM Rinat Shigapov wrote: > > Thomas, thank you for the details! > > Have you kept the branch that you used to generate the patch? Which commit > should the patch apply to? > You can try something like git checkout 'master@{2018-05-13 13:37:00}' to get a commit by date

Re: run pgindent on a regular basis / scripted manner

2023-02-07 Thread Robert Haas
On Tue, Feb 7, 2023 at 8:17 AM Andrew Dunstan wrote: > My git-fu is probably not all that it should be. I think we could possibly > get at this list of files by running > > git status --porcelain --untracked-files=no --ignored=no -- . > > And then your --dirty list would be lines beginning with

RE: Exit walsender before confirming remote flush in logical replication

2023-02-07 Thread Hayato Kuroda (Fujitsu)
> Dear Andres, Amit, > > > On 2023-02-07 09:00:13 +0530, Amit Kapila wrote: > > > On Tue, Feb 7, 2023 at 2:04 AM Andres Freund wrote: > > > > How about we make it an option in START_REPLICATION? Delayed logical > > rep can > > > > toggle that on by default. > > > > > Works for me. So, when this o

Re: run pgindent on a regular basis / scripted manner

2023-02-07 Thread Tom Lane
Justin Pryzby writes: > On Sat, Feb 04, 2023 at 12:37:11PM -0500, Tom Lane wrote: >> But it's not clear to me why you're allergic to the perl wrapper? > My allergy is to the totality of the process, not to the perl component. > It's a bit weird to enforce a coding style that no upstream indent to

Re: run pgindent on a regular basis / scripted manner

2023-02-07 Thread Andrew Dunstan
On 2023-02-07 Tu 10:25, Justin Pryzby wrote: On Sat, Feb 04, 2023 at 12:37:11PM -0500, Tom Lane wrote: Justin Pryzby writes: Hmmm ... inserting all of those as the default options would likely make it impossible to update pg_bsd_indent itself with anything like its current indent style (not th

Re: SQLFunctionCache and generic plans

2023-02-07 Thread Tom Lane
Ronan Dunklau writes: > The following comment can be found in functions.c, about the SQLFunctionCache: > * Note that currently this has only the lifespan of the calling query. > * Someday we should rewrite this code to use plancache.c to save parse/plan > * results for longer than that. > I w

Re: run pgindent on a regular basis / scripted manner

2023-02-07 Thread Justin Pryzby
On Sat, Feb 04, 2023 at 12:37:11PM -0500, Tom Lane wrote: > Justin Pryzby writes: > Hmmm ... inserting all of those as the default options would likely > make it impossible to update pg_bsd_indent itself with anything like > its current indent style (not that it's terribly consistent about > that

Re: run pgindent on a regular basis / scripted manner

2023-02-07 Thread Tom Lane
Amit Kapila writes: > On Tue, Feb 7, 2023 at 5:16 PM Andrew Dunstan wrote: >> On 2023-02-06 Mo 23:43, Noah Misch wrote: Yeah. I don't think we are seriously considering putting any restrictions in place on gitmaster >>> I could have sworn that was exactly what we were discussing, a pr

SQLFunctionCache and generic plans

2023-02-07 Thread Ronan Dunklau
Hello, It has been brought to my attention that SQL functions always use generic plans. Take this function for example: create or replace function test_plpgsql(p1 oid) returns text as $$ BEGIN RETURN (SELECT relname FROM pg_class WHERE oid = p1 OR p1 IS NULL LIMIT 1); END; $$ language pl

Re: daitch_mokotoff module

2023-02-07 Thread Dag Lem
Hi Paul, I just went by to check the status of the patch, and I noticed that you've added yourself as reviewer earlier - great! Please tell me if there is anything I can do to help bring this across the finish line. Best regards, Dag Lem

RE: Exit walsender before confirming remote flush in logical replication

2023-02-07 Thread Hayato Kuroda (Fujitsu)
Dear Andres, Amit, > On 2023-02-07 09:00:13 +0530, Amit Kapila wrote: > > On Tue, Feb 7, 2023 at 2:04 AM Andres Freund wrote: > > > How about we make it an option in START_REPLICATION? Delayed logical > rep can > > > toggle that on by default. > > > Works for me. So, when this option is set in S

How to solve "too many Lwlocks taken"?

2023-02-07 Thread jack...@gmail.com
I'm trying to write am table_am extension. But I get "too many Lwlocks taken" after I insert too many tuples. So I try to use UnLockBuffers() everywhere; but it still give me "too many Lwlocks taken", So how should I release All locks? -- jack...@gmail.com

Track Oldest Initialized WAL Buffer Page

2023-02-07 Thread Bharath Rupireddy
Hi, While working on [1], I was looking for a quick way to tell if a WAL record is present in the WAL buffers array without scanning but I couldn't find one. Hence, I put up a patch that basically tracks the oldest initialized WAL buffer page, named OldestInitializedPage, in XLogCtl. With OldestIn

RE: Time delayed LR (WAS Re: logical replication restrictions)

2023-02-07 Thread Takamichi Osumi (Fujitsu)
Hi, Horiguchi-san Thanks for your review ! On Tuesday, February 7, 2023 1:43 PM From: Kyotaro Horiguchi wrote: > At Mon, 6 Feb 2023 13:10:01 +, "Takamichi Osumi (Fujitsu)" > wrote in > subscriptioncmds.c > > + if (opts.streaming == > LOGICALREP_STREAM_P

RE: Time delayed LR (WAS Re: logical replication restrictions)

2023-02-07 Thread Takamichi Osumi (Fujitsu)
Hi, On Tuesday, February 7, 2023 2:26 PM Amit Kapila wrote: > On Tue, Feb 7, 2023 at 10:13 AM Kyotaro Horiguchi > wrote: > > > > At Mon, 6 Feb 2023 13:10:01 +, "Takamichi Osumi (Fujitsu)" > > wrote in > > > The attached patch v29 has included your changes. > > > > catalogs.sgml > > > > +

RE: Time delayed LR (WAS Re: logical replication restrictions)

2023-02-07 Thread Takamichi Osumi (Fujitsu)
Hi, On Tuesday, February 7, 2023 6:56 PM Amit Kapila wrote: > On Tue, Feb 7, 2023 at 8:22 AM Hayato Kuroda (Fujitsu) > wrote: > > > > Thank you for reviewing! PSA new version. > > > > Few comments: > = Thanks for your comments ! > 1. > @@ -74,6 +74,8 @@ CATALOG(pg_subscription,61

Re: [PATCH] Compression dictionaries for JSONB

2023-02-07 Thread Aleksander Alekseev
Hi, > > The complexity of page-level compression is significant, as pages are > > currently a base primitive of our persistency and consistency scheme. > > +many > > It's also not all a panacea performance-wise, datum-level decompression can > often be deferred much longer than page level decompre

Re: make_ctags: use -I option to ignore pg_node_attr macro

2023-02-07 Thread Yugo NAGATA
On Tue, 07 Feb 2023 21:29:04 +0900 (JST) Tatsuo Ishii wrote: > > Does is make sense to change make_etags as the attached patch does? > > This allows make_etags to use etags if Exuberant-type ctags is not > > available. This allows users to use make_etags if hey has either > > Exuberant-type ctags

Re: run pgindent on a regular basis / scripted manner

2023-02-07 Thread Andrew Dunstan
On 2023-02-07 Tu 07:59, Magnus Hagander wrote: On Tue, Feb 7, 2023 at 1:56 PM Amit Kapila wrote: On Tue, Feb 7, 2023 at 5:16 PM Andrew Dunstan wrote: > > On 2023-02-06 Mo 23:43, Noah Misch wrote: > > > Well, we did talk about adding a pre-commit hook to the

Re: run pgindent on a regular basis / scripted manner

2023-02-07 Thread Andrew Dunstan
On 2023-02-06 Mo 09:40, Robert Haas wrote: 2. I'd like an easy way to indent the unstaged files in the current directory (e.g. pgindent --dirty) or the files that have been queued up for commit (e.g. pgindent --cached). My git-fu is probably not all that it should be. I think we could possib

Allow auto_explain to log plan duration and buffer usage

2023-02-07 Thread torikoshia
Hi, -- commit 9d2d9728b8d546434aade4f9667a59666588edd6 Author: Michael Paquier Date: Thu Jan 26 12:23:16 2023 +0900 Make auto_explain print the query identifier in verbose mode ..(snip).. While looking at the area, I have noticed that more consolidation between EXPLAIN and auto_explain would

Re: run pgindent on a regular basis / scripted manner

2023-02-07 Thread Magnus Hagander
On Tue, Feb 7, 2023 at 1:56 PM Amit Kapila wrote: > On Tue, Feb 7, 2023 at 5:16 PM Andrew Dunstan wrote: > > > > On 2023-02-06 Mo 23:43, Noah Misch wrote: > > > > > > Well, we did talk about adding a pre-commit hook to the repository, with > > instructions for how to enable it. And I don't see a

Re: run pgindent on a regular basis / scripted manner

2023-02-07 Thread Amit Kapila
On Tue, Feb 7, 2023 at 5:16 PM Andrew Dunstan wrote: > > On 2023-02-06 Mo 23:43, Noah Misch wrote: > > > Well, we did talk about adding a pre-commit hook to the repository, with > instructions for how to enable it. And I don't see a problem with adding the > pre-receive we're discussing here to sr

Re: make_ctags: use -I option to ignore pg_node_attr macro

2023-02-07 Thread Tatsuo Ishii
> Does is make sense to change make_etags as the attached patch does? > This allows make_etags to use etags if Exuberant-type ctags is not > available. This allows users to use make_etags if hey has either > Exuberant-type ctags or etags. The patch drops support for "-n" option :-< Attached is th

Re: Missing TAG for FEB (current) Minor Version Release

2023-02-07 Thread Alvaro Herrera
On 2023-Feb-07, sujit.rat...@fujitsu.com wrote: > Hi OSS Community, > We just wanted to confirm when the TAG will be created for the current FEB > minor release as we could not find the TAG for none of the minor versions, > below is the screen shot for the some of the minor versions. Yes, it wil

  1   2   >