Re: Allow file inclusion in pg_hba and pg_ident files

2022-10-24 Thread Michael Paquier
On Mon, Oct 24, 2022 at 04:03:03PM +0800, Julien Rouhaud wrote: > It would also require to bring HbaLine->sourcefile. I'm afraid it would be > weird to introduce such a refactoring in a separate commit just to pass a > constant down multiple level of indirection, as all the macro will remain > spe

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

2022-10-24 Thread Peter Smith
FYI - After a recent push, the v40-0001 patch no longer applies on the latest HEAD. [postgres@CentOS7-x64 oss_postgres_misc]$ git apply ../patches_misc/v40-0001-Perform-streaming-logical-transactions-by-parall.patch error: patch failed: src/backend/replication/logical/launcher.c:54 error: src/back

Re: fixing typo in comment for restriction_is_or_clause

2022-10-24 Thread John Naylor
On Tue, Oct 25, 2022 at 9:48 AM Richard Guo wrote: > > > On Tue, Oct 25, 2022 at 10:05 AM John Naylor wrote: >> >> It's perfectly clear and simple now, even if it doesn't win at "code golf". > > > Agree with your point. Do you think we can further make the one-line > function a macro or an inlin

Re: GUC values - recommended way to declare the C variables?

2022-10-24 Thread Peter Smith
On Tue, Oct 25, 2022 at 4:09 PM Michael Paquier wrote: > > On Tue, Oct 25, 2022 at 02:43:43PM +1100, Peter Smith wrote: > > This is essentially the same as before except now, utilizing the > > GUC_DEFAULT_COMPILE flag added by Justin's patch [1], the sanity-check > > skips over any dynamic compile

Re: fixing typo in comment for restriction_is_or_clause

2022-10-24 Thread Japin Li
On Tue, 25 Oct 2022 at 12:01, Richard Guo wrote: > On Tue, Oct 25, 2022 at 11:46 AM Japin Li wrote: > >> >> On Tue, 25 Oct 2022 at 11:07, Zhihong Yu wrote: >> > Please take a look at patch v2. >> >> Maybe we should define those functions in headers. See patch v3. > > > Yes, putting them in .h

Some regression tests for the pg_control_*() functions

2022-10-24 Thread Michael Paquier
Hi all, As mentioned in [1], there is no regression tests for the SQL control functions: pg_control_checkpoint, pg_control_recovery, pg_control_system and pg_control_init. It would be minimal to check their execution, as of a "SELECT FROM func()", still some validation can be done on its output a

Re: Getting rid of SQLValueFunction

2022-10-24 Thread Michael Paquier
On Fri, Oct 21, 2022 at 02:27:07PM +0900, Michael Paquier wrote: > I have looked at that, and the attribute mapping remains compatible > with past versions once the appropriate pg_proc entries are added. > The updated patch set attached does that (with a user() function as > well to keep the code a

Re: GUC values - recommended way to declare the C variables?

2022-10-24 Thread Michael Paquier
On Tue, Oct 25, 2022 at 02:43:43PM +1100, Peter Smith wrote: > This is essentially the same as before except now, utilizing the > GUC_DEFAULT_COMPILE flag added by Justin's patch [1], the sanity-check > skips over any dynamic compiler-dependent GUCs. Yeah, this is a self-reminder that I should try

Re: Issue in GIN fast-insert: XLogBeginInsert + Read/LockBuffer ordering

2022-10-24 Thread Tom Lane
Michael Paquier writes: > On Mon, Oct 24, 2022 at 02:22:16PM +0200, Alvaro Herrera wrote: >> I confess I don't understand why is it important that XLogBeginInsert is >> called inside the critical section. It seems to me that that part is >> only a side-effect of having to acquire the buffer locks

Re: Issue in GIN fast-insert: XLogBeginInsert + Read/LockBuffer ordering

2022-10-24 Thread Michael Paquier
On Mon, Oct 24, 2022 at 02:22:16PM +0200, Alvaro Herrera wrote: > I suppose it's a matter of whether any bugs are possible outside of > Neon. If yes, then definitely this should be backpatched. Offhand, I > don't see any. On the other hand, even if no bugs are known, then it's > still valuable t

Re: Understanding, testing and improving our Windows filesystem code

2022-10-24 Thread Thomas Munro
I pushed the bug fixes from this series, without their accompanying tests. Here's a rebase of the test suite, with all those tests now squashed into the main test patch, and also the tell-Windows-to-be-more-like-Unix patch. Registered in the commitfest. From 1b70db7f4068df22b29e02d0c1b759195e0187

Re: fixing typo in comment for restriction_is_or_clause

2022-10-24 Thread Richard Guo
On Tue, Oct 25, 2022 at 11:46 AM Japin Li wrote: > > On Tue, 25 Oct 2022 at 11:07, Zhihong Yu wrote: > > Please take a look at patch v2. > > Maybe we should define those functions in headers. See patch v3. Yes, putting them in .h file is better to me. For the v3 patch, we can do the same one-

Re: fix stats_fetch_consistency value in postgresql.conf.sample

2022-10-24 Thread Peter Smith
On Tue, Oct 25, 2022 at 9:05 AM Justin Pryzby wrote: > > On Mon, Sep 26, 2022 at 05:29:58PM +0900, Kyotaro Horiguchi wrote: > > At Sat, 17 Sep 2022 23:53:07 -0500, Justin Pryzby > > wrote in ... > Rebased the patch. > > I also split the flag into DEFAULTS_COMPILE and DEFAULTS_INITDB, since > th

Re: fixing typo in comment for restriction_is_or_clause

2022-10-24 Thread Japin Li
On Tue, 25 Oct 2022 at 11:07, Zhihong Yu wrote: > Please take a look at patch v2. Maybe we should define those functions in headers. See patch v3. -- Regrads, Japin Li. ChengDu WenWu Information Technology Co.,Ltd. diff --git a/src/backend/optimizer/util/restrictinfo.c b/src/backend/optimize

Re: GUC values - recommended way to declare the C variables?

2022-10-24 Thread Peter Smith
On Thu, Oct 20, 2022 at 6:52 PM Peter Smith wrote: > > On Thu, Oct 20, 2022 at 3:16 PM Justin Pryzby wrote: > > > > On Thu, Oct 20, 2022 at 11:56:58AM +1100, Peter Smith wrote: > > > Patch 0002 adds a sanity-check function called by > > > InitializeGUCOptions, as suggested by Tom [2]. This is to

Outdated comments in AssignTransactionId?

2022-10-24 Thread Japin Li
The AssignTransactionId has the following comments: /* * ensure this test matches similar one in * RecoverPreparedTransactions() */ if (nUnreportedXids >= PGPROC_MAX_CACHED_SUBXIDS || log_unknown_top) { ... } Howe

Re: Improve tab completion for ALTER STATISTICS

2022-10-24 Thread vignesh C
On Mon, 24 Oct 2022 at 12:30, Michael Paquier wrote: > > On Wed, Oct 19, 2022 at 04:06:51PM +0530, vignesh C wrote: > > I noticed that the tab completion for ALTER STATISTICS .. SET was not > > handled. The attached patch displays SCHEMA and STATISTICS for tab > > completion of ALTER STATISTICS na

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

2022-10-24 Thread Masahiko Sawada
On Fri, Oct 21, 2022 at 6:32 PM houzj.f...@fujitsu.com wrote: > > On Thursday, October 20, 2022 5:49 PM Amit Kapila > wrote: > > On Thu, Oct 20, 2022 at 2:08 PM Peter Smith > > wrote: > > > > > > 7. get_transaction_apply_action > > > > > > > 12. get_transaction_apply_action > > > > > > > > I st

Re: fixing typo in comment for restriction_is_or_clause

2022-10-24 Thread Zhihong Yu
On Mon, Oct 24, 2022 at 7:58 PM Japin Li wrote: > > On Tue, 25 Oct 2022 at 10:48, Richard Guo wrote: > > On Tue, Oct 25, 2022 at 10:05 AM John Naylor < > john.nay...@enterprisedb.com> > > wrote: > > > >> > >> On Tue, Oct 25, 2022 at 12:19 AM Zhihong Yu wrote: > >> > > >> > Hi, > >> > When I was

Re: fixing typo in comment for restriction_is_or_clause

2022-10-24 Thread Japin Li
On Tue, 25 Oct 2022 at 10:48, Richard Guo wrote: > On Tue, Oct 25, 2022 at 10:05 AM John Naylor > wrote: > >> >> On Tue, Oct 25, 2022 at 12:19 AM Zhihong Yu wrote: >> > >> > Hi, >> > When I was looking at src/backend/optimizer/util/restrictinfo.c, I found >> a typo in one of the comments. >> >

Re: fixing typo in comment for restriction_is_or_clause

2022-10-24 Thread Richard Guo
On Tue, Oct 25, 2022 at 10:05 AM John Naylor wrote: > > On Tue, Oct 25, 2022 at 12:19 AM Zhihong Yu wrote: > > > > Hi, > > When I was looking at src/backend/optimizer/util/restrictinfo.c, I found > a typo in one of the comments. > > Using "t" as an abbreviation for "true" was probably intentiona

Re: Some comments that should've covered MERGE

2022-10-24 Thread Richard Guo
On Mon, Oct 24, 2022 at 6:59 PM Alvaro Herrera wrote: > On 2022-Oct-19, Richard Guo wrote: > > > Hi hackers, > > > > I happened to notice $subject. Attach a trivial patch for that. > > Thanks, applied. I did change the comment atop setTargetTable, which I > thought could use a little bit more de

Re: Question about savepoint level?

2022-10-24 Thread Richard Guo
On Mon, Oct 24, 2022 at 6:01 PM Alvaro Herrera wrote: > On 2022-Oct-24, Richard Guo wrote: > > ISTM the savepointLevel always remains the same as what is in > > TopTransactionStateData after looking at the codes. Now I also get > > confused. Maybe what we want is nestingLevel? > > This has alread

Re: fixing typo in comment for restriction_is_or_clause

2022-10-24 Thread John Naylor
On Tue, Oct 25, 2022 at 12:19 AM Zhihong Yu wrote: > > Hi, > When I was looking at src/backend/optimizer/util/restrictinfo.c, I found a typo in one of the comments. Using "t" as an abbreviation for "true" was probably intentional, so not a typo. There is no doubt what the behavior is. > I also t

Re: [PATCHES] Post-special page storage TDE support

2022-10-24 Thread Julien Rouhaud
Hi, On Mon, Oct 24, 2022 at 12:55:53PM -0500, David Christensen wrote: > > Explicitly > locking (assuming you stay in your lane) should only need to guard > against access from other > backends of this type if using shared buffers, so will be use-case dependent. I'm not sure what you mean here?

Re: parse partition strategy string in gram.y

2022-10-24 Thread Tom Lane
Alvaro Herrera writes: > On 2022-Oct-24, Finnerty, Jim wrote: >> The advantage of hash partition bounds is that they are not >> domain-specific, as they are for ordinary RANGE partitions, but they >> are more flexible than MODULUS/REMAINDER partition bounds. I'm more than a bit skeptical of that

Re: Crash after a call to pg_backup_start()

2022-10-24 Thread Michael Paquier
On Mon, Oct 24, 2022 at 11:39:19AM +0200, Alvaro Herrera wrote: > Reading it again, I agree with your conclusion, so I'll push as you > proposed with some extra tests, after they complete running. Thanks for the fix, Álvaro! -- Michael signature.asc Description: PGP signature

Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert

2022-10-24 Thread Jacob Champion
On Mon, Oct 4, 2021 at 9:14 PM Bruce Momjian wrote: > On Tue, Sep 28, 2021 at 02:54:39AM -0700, tho...@habets.se wrote: > > And you say for complex setups. Fair enough. But currently I'd say the > > default is wrong, and what should be default is not configurable. > > Agreed, I think this needs mu

Re: Question about "compound" queries.

2022-10-24 Thread David G. Johnston
On Mon, Oct 24, 2022 at 3:02 PM Anton A. Melnikov wrote: > Hello! > > Please, could somebody explain what the "compound" queries were created > for? > Maybe i'm calling them wrong. It's about queries like: > SELECT 1 + 2 \; SELECT 2.0 AS "float" \; SELECT 1; > > Such queries can neither be prepa

Re: Interesting areas for beginners

2022-10-24 Thread Matheus Alcantara
Thanks so much for the answers, I'll try to start looking at some patches. -- Matheus Alcantara

Re: fix stats_fetch_consistency value in postgresql.conf.sample

2022-10-24 Thread Justin Pryzby
On Mon, Sep 26, 2022 at 05:29:58PM +0900, Kyotaro Horiguchi wrote: > At Sat, 17 Sep 2022 23:53:07 -0500, Justin Pryzby > wrote in > > This is an alternative implementation, which still relies on adding the > > GUC_DYNAMIC, flag but doesn't require adding a new, sql-accessible > > function to con

Question about "compound" queries.

2022-10-24 Thread Anton A. Melnikov
Hello! Please, could somebody explain what the "compound" queries were created for? Maybe i'm calling them wrong. It's about queries like: SELECT 1 + 2 \; SELECT 2.0 AS "float" \; SELECT 1; Such queries can neither be prepared nor used in the extended protocol with ERROR: cannot insert multip

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

2022-10-24 Thread Melanie Plageman
On Sun, Oct 23, 2022 at 6:35 PM Maciek Sakrejda wrote: > > On Wed, Oct 19, 2022 at 12:27 PM Melanie Plageman > wrote: > > > > v34 is attached. > > I think the column names need discussion. Also, the docs need more work > > (I added a lot of new content there). I could use feedback on the column >

Re: Pluggable toaster

2022-10-24 Thread Nikita Malakhov
Hi, Aleksander, thanks for the discussion! It seems to me that I have to add some parts of it to API documentation, to clarify the details on API purpose and use-cases. On Mon, Oct 24, 2022 at 6:37 PM Aleksander Alekseev < aleksan...@timescale.com> wrote: > Hi Nikita, > > > > > TOAST implementat

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

2022-10-24 Thread Melanie Plageman
On Thu, Oct 20, 2022 at 1:31 PM Andres Freund wrote: > > Hi, > > - we shouldn't do pgstat_count_io_op() while the buffer header lock is held, > if possible. I've changed this locally. It will be fixed in the next version I share. > > I wonder if we should add a "source" output argument to >

fixing typo in comment for restriction_is_or_clause

2022-10-24 Thread Zhihong Yu
Hi, When I was looking at src/backend/optimizer/util/restrictinfo.c, I found a typo in one of the comments. I also took the chance to simplify the code a little bit. Please take a look at the patch. Thanks is-or.patch Description: Binary data

Re: New docs chapter on Transaction Management and related changes

2022-10-24 Thread Robert Treat
On Mon, Oct 24, 2022 at 11:02 AM Simon Riggs wrote: > > On Sun, 16 Oct 2022 at 02:08, Bruce Momjian wrote: > > > > On Fri, Oct 14, 2022 at 05:46:55PM -0400, Robert Treat wrote: > > > On Fri, Oct 14, 2022 at 3:51 PM Bruce Momjian wrote: > > > > Attached is the merged patch from all the great comm

Re: parse partition strategy string in gram.y

2022-10-24 Thread Alvaro Herrera
On 2022-Oct-24, Finnerty, Jim wrote: > Is there a reason why HASH partitioning does not currently support > range partition bounds, where the values in the partition bounds would > refer to the hashed value? Just lack of an implementation, I suppose. > The advantage of hash partition bounds is t

Re: Decoupling antiwraparound autovacuum from special rules around auto cancellation

2022-10-24 Thread Peter Geoghegan
On Mon, Oct 24, 2022 at 8:43 AM Jeff Davis wrote: > > Even if regular/early autovacuum had just one > > opportunity to run to completion, we'd already be much better off. > > By "opportunity", you mean that, regardless of configuration, the > cancellable autovacuum would at least start; though it

Re: Decoupling antiwraparound autovacuum from special rules around auto cancellation

2022-10-24 Thread Jeff Davis
On Mon, 2022-10-24 at 07:25 -0700, Peter Geoghegan wrote: > The really important thing is giving a regular/early autocancellable > autovacuum triggered by age(relfrozenxid) *some* opportunity to run. +1. That principle seems both reasonable from a system standpoint and understandable to a user. >

Re: Pluggable toaster

2022-10-24 Thread Aleksander Alekseev
Hi Nikita, > > > TOAST implementation is not necessary for Table AM. > > >What other use cases for TOAST do you have in mind? > > The main use case is the same as for the TOAST mechanism - storing and > retrieving > oversized data. But we expanded this case with some details - > - update TOASTed

Re: effective_multixact_freeze_max_age issue

2022-10-24 Thread Peter Geoghegan
On Mon, Oct 24, 2022 at 7:56 AM Peter Geoghegan wrote: > I don't understand what you mean. FreezeLimit *isn't* always exactly > 50 million XIDs before OldestXmin -- not anymore. In fact that's the > main benefit of this work (commit c3ffa731). That detail has changed > (and changed for the better)

Re: Add the ability to limit the amount of memory that can be allocated to backends.

2022-10-24 Thread Arne Roland
Hello Reid, could you rebase the patch again? It doesn't apply currently (http://cfbot.cputube.org/patch_40_3867.log). Thanks! You mention, that you want to prevent the compiler from getting cute. I don't think this comments are exactly helpful in the current state. I think probably fine to

[PATCH] minor optimization for ineq_histogram_selectivity()

2022-10-24 Thread Frédéric Yhuel
Hello, When studying the weird planner issue reported here [1], I came up with the attached patch. It reduces the probability of calling get_actual_variable_range(). The patch applies to the master branch. How to test : CREATE TABLE foo (a bigint, b TEXT) WITH (autovacuum_enabled = off); IN

Re: New docs chapter on Transaction Management and related changes

2022-10-24 Thread Simon Riggs
On Sun, 16 Oct 2022 at 02:08, Bruce Momjian wrote: > > On Fri, Oct 14, 2022 at 05:46:55PM -0400, Robert Treat wrote: > > On Fri, Oct 14, 2022 at 3:51 PM Bruce Momjian wrote: > > > Attached is the merged patch from all the great comments I received. I > > > have also rebuilt the docs with the upd

Re: effective_multixact_freeze_max_age issue

2022-10-24 Thread Peter Geoghegan
On Mon, Oct 24, 2022 at 1:18 AM Anton A. Melnikov wrote: > > Also, the proposed new WARNING is only seen when we're > > bound to also see the existing OldestXmin WARNING already. Why have 2 > > WARNINGs about exactly the same problem?> > > I didn't understand this moment. > > If the FreezeLimit is

Re: Pluggable toaster

2022-10-24 Thread Nikita Malakhov
Hi! >From personal experience with the project I have serious doubts this >is going to happen. Before such invasive changes are going to be >accepted there should be a clear understanding of how exactly TOASTers >are supposed to be used. This should be part of the documentation in >the patchset. A

Re: parse partition strategy string in gram.y

2022-10-24 Thread Finnerty, Jim
Is there a reason why HASH partitioning does not currently support range partition bounds, where the values in the partition bounds would refer to the hashed value? The advantage of hash partition bounds is that they are not domain-specific, as they are for ordinary RANGE partitions, but they

Re: Decoupling antiwraparound autovacuum from special rules around auto cancellation

2022-10-24 Thread Peter Geoghegan
On Sun, Oct 23, 2022 at 9:32 PM Jeff Davis wrote: > It's possible this would be easier for users to understand: one process > that does cleanup work over time in a way that minimizes interference; > and another process that activates in more urgent situations (perhaps > due to misconfiguration of

Re: Pluggable toaster

2022-10-24 Thread Aleksander Alekseev
Hi Nikita, > Using Table AM Routine and routing AM methods calls via it is a topic for > further discussion, > if Pluggable TOAST will be committed. [...] And even then it would be an open > issue. >From personal experience with the project I have serious doubts this is going to happen. Before

Re: [patch] Have psql's \d+ indicate foreign partitions

2022-10-24 Thread Justin Pryzby
On Mon, Oct 24, 2022 at 09:44:18PM +0900, Ian Lawrence Barwick wrote: > Recently I have been working a lot with partitioned tables which contain a mix > of local and foreign partitions, and find it would be very useful to be able > to > easily obtain an overview of which partitions are foreign and

Re: Pluggable toaster

2022-10-24 Thread Nikita Malakhov
Hi, >This is exactly the point. In order to not to create a silver bullet, >TOASTers should be limited to a single TableAM. The one we know uses >pages of a known fixed size, the one that actually requires TOAST >because pages are relatively small, etc. Currently all our TOAST implementations use

[patch] Have psql's \d+ indicate foreign partitions

2022-10-24 Thread Ian Lawrence Barwick
Hi Recently I have been working a lot with partitioned tables which contain a mix of local and foreign partitions, and find it would be very useful to be able to easily obtain an overview of which partitions are foreign and where they are located. Currently, executing "\d+" on a partitioned table

Re: Issue in GIN fast-insert: XLogBeginInsert + Read/LockBuffer ordering

2022-10-24 Thread Alvaro Herrera
On 2022-Oct-13, Michael Paquier wrote: > On Wed, Oct 12, 2022 at 08:54:34PM -0400, Tom Lane wrote: > > Don't we need to back-patch these fixes? > > I guess I should, though I have finished by not doing due to the > unlikeliness of the problem, where we would need the combination of a > page evict

Re: PATCH: Using BRIN indexes for sorted output

2022-10-24 Thread Tomas Vondra
On 10/24/22 06:32, Justin Pryzby wrote: > On Sat, Oct 15, 2022 at 02:33:50PM +0200, Tomas Vondra wrote: >> Of course, if there are e.g. BTREE indexes this is going to be slower, >> but people are unlikely to have both index types on the same column. > > On Sun, Oct 16, 2022 at 05:48:31PM +0200,

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

2022-10-24 Thread Amit Kapila
On Mon, Oct 24, 2022 at 11:41 AM Peter Smith wrote: > > Here are my review comments for v40-0001. > > == > > src/backend/replication/logical/worker.c > > > 1. should_apply_changes_for_rel > > + else if (am_parallel_apply_worker()) > + { > + if (rel->state != SUBREL_STATE_READY) > + ereport(ERR

Re: Pluggable toaster

2022-10-24 Thread Aleksander Alekseev
Hi Nikita, > >I don't argue with most of what you say. I am just pointing out the > >reason why the chosen approach "N TOASTers x M TableAMs" will not > >work: > > We assume that TAM used in custom Toaster works as it is should work, > and leave TAM internals to this TAM developer - say, we do not

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

2022-10-24 Thread Masahiko Sawada
On Wed, Oct 12, 2022 at 3:04 PM Amit Kapila wrote: > > On Tue, Oct 11, 2022 at 5:52 AM Masahiko Sawada wrote: > > > > On Fri, Oct 7, 2022 at 2:00 PM Amit Kapila wrote: > > > > > > About your point that having different partition structures for > > > publisher and subscriber, I don't know how com

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

2022-10-24 Thread Amit Kapila
On Fri, Oct 21, 2022 at 3:02 PM houzj.f...@fujitsu.com wrote: > Few comments on the 0001 and 0003 patches: v40-0001* == 1. + /* + * The queue used to transfer messages from the parallel apply worker to + * the leader apply worker. + */ + shm_mq_handle *error_mq_handle; Shall we say erro

Re: Testing DDL Deparser

2022-10-24 Thread Alvaro Herrera
On 2022-Oct-20, Runqi Tian wrote: > My question regarding subcommand is actually on commands other than > ALTER TABLE. Let me give an example (You can also find this example in > the patch), when command like > > CREATE SCHEMA element_test CREATE TABLE foo (id int) > > is caught by ddl_command_e

Re: Pluggable toaster

2022-10-24 Thread Nikita Malakhov
Hi! >I don't argue with most of what you say. I am just pointing out the >reason why the chosen approach "N TOASTers x M TableAMs" will not >work: We assume that TAM used in custom Toaster works as it is should work, and leave TAM internals to this TAM developer - say, we do not want to change in

Re: Mingw task for Cirrus CI

2022-10-24 Thread Melih Mutlu
Hi, > > + > > + on_failure: > > +<<: *on_failure_meson > > +cores_script: | > > + %BASH_EXE% -lc "cd build src/tools/ci/cores_backtrace.sh msys > build/tmp_install" > > + > > This is wrong - it should just archive the same files that the current > windows > task does. > Changed it

Re: Question about savepoint level?

2022-10-24 Thread Alvaro Herrera
On 2022-Oct-24, Japin Li wrote: > On Mon, 24 Oct 2022 at 17:56, Alvaro Herrera wrote: > > Now that we have transaction-controlling procedures, I think the next > > step is to add the SQL-standard feature that allows savepoint level > > control for them, which would make the savepointLevel no lon

Re: Some comments that should've covered MERGE

2022-10-24 Thread Alvaro Herrera
On 2022-Oct-19, Richard Guo wrote: > Hi hackers, > > I happened to notice $subject. Attach a trivial patch for that. Thanks, applied. I did change the comment atop setTargetTable, which I thought could use a little bit more detail on what is happening, and also in its callsite in transformMerge

Re: Question about savepoint level?

2022-10-24 Thread Japin Li
On Mon, 24 Oct 2022 at 17:56, Alvaro Herrera wrote: > This has already been discussed: > https://postgr.es/m/1317297307-sup-7...@alvh.no-ip.org Sorry for my lazy search. > Now that we have transaction-controlling procedures, I think the next > step is to add the SQL-standard feature that allow

Re: Patch proposal: make use of regular expressions for the username in pg_hba.conf

2022-10-24 Thread Drouvot, Bertrand
Hi, On 10/24/22 5:34 AM, Michael Paquier wrote: On Fri, Oct 21, 2022 at 02:10:37PM +0200, Drouvot, Bertrand wrote: On 10/21/22 2:58 AM, Michael Paquier wrote: I have spent a couple of hours doing a pass over v2, playing manually with regex patterns, reloads, the system views and item lists.

Re: Question about savepoint level?

2022-10-24 Thread Alvaro Herrera
On 2022-Oct-24, Richard Guo wrote: > On Mon, Oct 24, 2022 at 3:00 PM Japin Li wrote: > > > I try to remove the savepointLevel, and it seems harmless. Any thoughts? > > ISTM the savepointLevel always remains the same as what is in > TopTransactionStateData after looking at the codes. Now I also

Re: Reducing the chunk header sizes on all memory context types

2022-10-24 Thread John Naylor
On Thu, Oct 20, 2022 at 1:55 AM Andres Freund wrote: > > Hi, > > On 2022-10-11 10:21:17 +0700, John Naylor wrote: > > On Tue, Oct 11, 2022 at 5:31 AM David Rowley wrote: > > > > > > The proposed patches in [1] do aim to make additional usages of the > > > slab allocator, and I have a feeling that

pg_dump: Refactor code that constructs ALTER ... OWNER TO commands

2022-10-24 Thread Peter Eisentraut
Avoid having to list all the possible object types twice. Instead, only _getObjectDescription() needs to know about specific object types. It communicates back to _printTocEntry() whether an owner is to be set. In passing, remove the logic to use ALTER TABLE to set the owner of views and seq

Re: Crash after a call to pg_backup_start()

2022-10-24 Thread Alvaro Herrera
On 2022-Oct-24, Michael Paquier wrote: > On the contrary, it seems to me that putting the assertion within the > if() block makes the assertion weaker, because we would never check > for an incorrect state after do_pg_abort_backup() is registered (aka > any pg_backup_start() call) when not enterin

Re: Question about savepoint level?

2022-10-24 Thread Richard Guo
On Mon, Oct 24, 2022 at 3:00 PM Japin Li wrote: > On Mon, 24 Oct 2022 at 12:19, Japin Li wrote: > > The TransactionStateData has savepointLevel field, however, I do not > understand > > what is savepoint level, it seems all savepoints have the same > savepointLevel, > > I want to know how the sa

Re: Pluggable toaster

2022-10-24 Thread Aleksander Alekseev
Hi Nikita, I don't argue with most of what you say. I am just pointing out the reason why the chosen approach "N TOASTers x M TableAMs" will not work: > Don't you think that this is an arguable design decision? Basically > all we know about the underlying TableAM is that it stores tuples > _someh

Re: effective_multixact_freeze_max_age issue

2022-10-24 Thread Anton A. Melnikov
Hello! On 18.10.2022 20:56, Peter Geoghegan wrote: The term "removable cutoff" is how VACUUM VERBOSE reports OldestXmin. I think that it's good to use the same terminology here. Thanks for the explanation! Firstly exactly this term confused me. Sure, the same terminology makes all easier to

Re: Allow file inclusion in pg_hba and pg_ident files

2022-10-24 Thread Julien Rouhaud
Hi, On Mon, Oct 24, 2022 at 04:13:51PM +0900, Michael Paquier wrote: > On Mon, Oct 24, 2022 at 01:33:12PM +0800, Julien Rouhaud wrote: > > v12 attached, fixing multiple conflicts with recent activity. > > typedef struct TokenizedAuthLine > { > List *fields; /* List of lists of

PGDOCS - Logical replication GUCs - added some xrefs

2022-10-24 Thread Peter Smith
Hi hackers. There is a docs Logical Replication section "31.10 Configuration Settings" [1] which describes some logical replication GUCs, and details on how they interact with each other and how to take that into account when setting their values. There is another docs Server Configuration sectio

Re: Move backup-related code to xlogbackup.c/.h

2022-10-24 Thread Michael Paquier
On Wed, Oct 19, 2022 at 09:07:04PM +0530, Bharath Rupireddy wrote: > XLogBackupResetRunning() seemed better. +1 for above function names. I see what you are doing here. XLogCtl would still live in xlog.c, but we want to have functions that are able to manipulate some of its fields. I am not sure

Re: Allow file inclusion in pg_hba and pg_ident files

2022-10-24 Thread Michael Paquier
On Mon, Oct 24, 2022 at 01:33:12PM +0800, Julien Rouhaud wrote: > v12 attached, fixing multiple conflicts with recent activity. typedef struct TokenizedAuthLine { List *fields; /* List of lists of AuthTokens */ + char *file_name; /* File name * Hmm. While putting

Re: [PATCH] minor bug fix for pg_dump --clean

2022-10-24 Thread Frédéric Yhuel
On 10/24/22 03:01, Tom Lane wrote: =?UTF-8?Q?Fr=c3=a9d=c3=a9ric_Yhuel?= writes: When using pg_dump (or pg_restore) with option "--clean", there is some SQL code to drop every objects at the beginning. Yup ... The DROP statement for a view involving circular dependencies is : CREATE OR REPLA

Re: Improve tab completion for ALTER STATISTICS

2022-10-24 Thread Michael Paquier
On Wed, Oct 19, 2022 at 04:06:51PM +0530, vignesh C wrote: > I noticed that the tab completion for ALTER STATISTICS .. SET was not > handled. The attached patch displays SCHEMA and STATISTICS for tab > completion of ALTER STATISTICS name SET. Indeed, it is a bit strange as we would get a list of s

Re: Question about savepoint level?

2022-10-24 Thread Japin Li
On Mon, 24 Oct 2022 at 12:19, Japin Li wrote: > Hi, hackers > > The TransactionStateData has savepointLevel field, however, I do not > understand > what is savepoint level, it seems all savepoints have the same savepointLevel, > I want to know how the savepoint level changes. I try to remove th