Re: Allow file inclusion in pg_hba and pg_ident files

2022-10-23 Thread Julien Rouhaud
On Mon, Oct 10, 2022 at 10:51:32AM +0800, Julien Rouhaud wrote: > On Sun, Sep 18, 2022 at 01:06:12AM +0800, Julien Rouhaud wrote: > > On Tue, Aug 16, 2022 at 02:10:30PM +0800, Julien Rouhaud wrote: > > > > > > On Sat, Jul 30, 2022 at 04:09:36PM +0800, Julien Rouhaud wrote: > > > > > > > > > > > -

Re: Crash after a call to pg_backup_start()

2022-10-23 Thread Michael Paquier
On Mon, Oct 24, 2022 at 11:42:58AM +0900, Kyotaro Horiguchi wrote: > At Sat, 22 Oct 2022 09:56:06 +0200, Alvaro Herrera > wrote in >> My intention here was that the Assert should be inside the block, that >> is, we already know that at least one is true, and we want to make sure >> that they

Re: Decoupling antiwraparound autovacuum from special rules around auto cancellation

2022-10-23 Thread Jeff Davis
On Fri, 2022-10-21 at 17:39 -0700, Peter Geoghegan wrote: > One small thought on the presentation/docs side of this: maybe it > would be better to invent a new kind of autovacuum It's possible this would be easier for users to understand: one process that does cleanup work over time in a way that

Question about savepoint level?

2022-10-23 Thread Japin Li
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. -- Regrads, Japin Li. ChengDu WenWu Information Technology Co.,Ltd.

Re: [PoC] Reducing planning time when tables have many partitions

2022-10-23 Thread Yuya Watari
Hello, On Wed, Sep 21, 2022 at 6:43 PM Yuya Watari wrote: > 1.1. Revert one of our optimizations (v5) > > As I mentioned in the comment in > v[5|6|7]-0002-Revert-one-of-the-optimizations.patch, I reverted one of > our optimizations. This code tries to find EquivalenceMembers that do > not

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

2022-10-23 Thread Michael Paquier
On Fri, Oct 21, 2022 at 02:10:37PM +0200, Drouvot, Bertrand wrote: > On 10/21/22 2:58 AM, Michael Paquier wrote: >> The same approach with keywords first, regex, and exact match could be >> applied as well for the databases? Perhaps it is just mainly a matter >> of taste, > > Yeah, I think it

Re: doubt about FullTransactionIdAdvance()

2022-10-23 Thread Zhang Mingli
Hi, Andres On Oct 24, 2022, 01:16 +0800, Andres Freund , wrote: > Hi, > > On 2022-10-22 11:32:47 +0800, Zhang Mingli wrote: > > Hi, hackers > > > > I don't quite understand FullTransactionIdAdvance(), correct me if I’m > > wrong. > > > > > > /* > >  * Advance a FullTransactionId variable,

Re: csv_populate_recordset and csv_agg

2022-10-23 Thread Tom Lane
Steve Chavez writes: > CSV processing is also a common use case and PostgreSQL has the COPY .. > FROM .. CSV form but COPY is not compatible with libpq pipeline mode and > the interface is clunkier to use. > I propose to include two new functions: > - csv_populate_recordset ( base anyelement,

Re: pg_recvlogical prints bogus error when interrupted

2022-10-23 Thread Bharath Rupireddy
On Fri, Oct 21, 2022 at 7:52 AM Kyotaro Horiguchi wrote: > > > +1. How about emitting a message like its friend pg_receivewal, like > > the attached patch? > > I'm not a fan of treating SIGINT as an error in this case. It calls > prepareToTerminate() when time_to_abort and everything goes fine

Re: cross-platform pg_basebackup

2022-10-23 Thread Julien Rouhaud
Hi, On Fri, Oct 21, 2022 at 09:15:39AM -0400, Robert Haas wrote: > > Committed and back-patched to all supported branches. Is there any additional things to be taken care of or should https://commitfest.postgresql.org/40/3954/ be closed?

Re: Crash after a call to pg_backup_start()

2022-10-23 Thread Kyotaro Horiguchi
At Sat, 22 Oct 2022 09:56:06 +0200, Alvaro Herrera wrote in > On 2022-Oct-21, Michael Paquier wrote: > > > On Fri, Oct 21, 2022 at 05:53:25PM +0800, Richard Guo wrote: > > > > /* These conditions can not be both true */ > > > > If you do that, it would be a bit easier to read as of the

Re: [DOCS] Stats views and functions not in order?

2022-10-23 Thread Peter Smith
A rebase was needed. PSA v3*. -- Kind Regards, Peter Smith. Fujitsu Australia

csv_populate_recordset and csv_agg

2022-10-23 Thread Steve Chavez
Hello hackers, The `json_populate_recordset` and `json_agg` functions allow systems to process/generate json directly on the database. This "cut outs the middle tier"[1] and notably reduces the complexity of web applications. CSV processing is also a common use case and PostgreSQL has the COPY

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

2022-10-23 Thread Tom Lane
=?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 REPLACE VIEW [...] > (see commit

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

2022-10-23 Thread Виктория Шепард
Hi, Good catch! Here are several points for improvement: 1. pg_dump.c:17380 Maybe better to write simpler appendPQExpBuffer(delcmd, "CREATE SCHEMA IF NOT EXISTS %s;\n", tbinfo->dobj.namespace->dobj.name); because there is a schema name inside the `tbinfo->dobj.namespace->dobj.name ` 2.

Re: Use simplehash.h instead of dynahash in SMgr

2022-10-23 Thread Andres Freund
Hi, On 2021-04-25 03:58:38 +1200, David Rowley wrote: > Currently, we use dynahash hash tables to store the SMgrRelation so we > can perform fast lookups by RelFileNodeBackend. However, I had in mind > that a simplehash table might perform better. So I tried it... > The test case was basically

Re: Multiple grouping set specs referencing duplicate alias

2022-10-23 Thread Tom Lane
David Kimura writes: > I think I may have stumbled across a case of wrong results on HEAD (same > through version 9.6, though interestingly 9.5 produces different results > altogether). > test=# SELECT i AS ai1, i AS ai2 FROM generate_series(1,3)i GROUP BY > ai2, ROLLUP(ai1) ORDER BY ai1, ai2;

Re: Re[2]: Possible solution for masking chosen columns when using pg_dump

2022-10-23 Thread Виктория Шепард
Hi, Thank you, Oleg Tselebrovskiy, for your valuable review, here are the fixes Best regards, Viktoria Shepard ср, 12 окт. 2022 г. в 12:19, Виктория Шепард : > Hi, > > Here is an idea of how to read masking options from a file. Please, take a > look. > > пн, 10 окт. 2022 г. в 14:54, Олег

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

2022-10-23 Thread Maciek Sakrejda
On Thu, Oct 20, 2022 at 10:31 AM Andres Freund wrote: > - "repossession" is a very unintuitive name for me. If we want something like > it, can't we just name it reuse_failed or such? +1, I think "repossessed" is awkward. I think "reuse_failed" works, but no strong opinions on an alternate

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

2022-10-23 Thread Maciek Sakrejda
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 > names and definitions and review/rephrasing ideas for the docs >

Re: Pluggable toaster

2022-10-23 Thread Nikita Malakhov
Hi! Aleksander, >Don't you think that this is an arguable design decision? Basically >all we know about the underlying TableAM is that it stores tuples >_somehow_ and that tuples have TIDs [1]. That's it. We don't know if >it even has any sort of pages, whether they are fixed in size or not,

Re: Interesting areas for beginners

2022-10-23 Thread Robert Treat
On Sun, Oct 23, 2022 at 6:24 AM Aleksander Alekseev wrote: > > Hi Matheus, > > > Some months ago I've got my first patch accept [1], and I'm looking to try > > to > > make other contributions. > > In personal experience reviewing other people's code is a good > starting point. Firstly, IMO this

Re: Tracking last scan time

2022-10-23 Thread Robert Treat
On Fri, Oct 14, 2022 at 2:55 PM Dave Page wrote: > On Fri, 14 Oct 2022 at 19:16, Andres Freund wrote: >> On 2022-10-13 14:38:06 +0100, Dave Page wrote: >> > Thanks for that. It looks good to me, bar one comment (repeated 3 times in >> > the sql and expected files): >> > >> > fetch timestamps

Re: doubt about FullTransactionIdAdvance()

2022-10-23 Thread Andres Freund
Hi, On 2022-10-22 11:32:47 +0800, Zhang Mingli wrote: > Hi, hackers > > I don't quite understand FullTransactionIdAdvance(), correct me if I’m wrong. > > > /* >  * Advance a FullTransactionId variable, stepping over xids that would appear >  * to be special only when viewed as 32bit XIDs. >  

Re: [PATCH] Replace "implementor" with "implementer"

2022-10-23 Thread Aleksander Alekseev
Hi Tom, > They're both valid according to the dictionaries I looked > at, eg [1]. I don't feel a need to change anything. OK, thanks. And sorry for the noise. -- Best regards, Aleksander Alekseev

Re: [PATCH] Replace "implementor" with "implementer"

2022-10-23 Thread Tom Lane
Aleksander Alekseev writes: > I noticed that there are several places where we use the spelling > "implementOr" while the correct one seems to be "implementEr". Here is > the patch. They're both valid according to the dictionaries I looked at, eg [1]. I don't feel a need to change anything.

Re: [PATCH] Replace "implementor" with "implementer"

2022-10-23 Thread Aleksander Alekseev
Hi hackers, > I noticed that there are several places where we use the spelling > "implementOr" while the correct one seems to be "implementEr". Here is > the patch. After a little more study I found evidence that both spellings can be acceptable [1]. As a non-native speaker I can't judge

Re: Interesting areas for beginners

2022-10-23 Thread Aleksander Alekseev
Hi Matheus, > Some months ago I've got my first patch accept [1], and I'm looking to try to > make other contributions. In personal experience reviewing other people's code is a good starting point. Firstly, IMO this is one of the most valuable contributions, since the community is always short

[PATCH] Replace "implementor" with "implementer"

2022-10-23 Thread Aleksander Alekseev
Hi hackers, I noticed that there are several places where we use the spelling "implementOr" while the correct one seems to be "implementEr". Here is the patch. -- Best regards, Aleksander Alekseev v1-0001-Fix-incorrect-spelling-of-the-word-implementer.patch Description: Binary data

Re: Difference between HeapTupleData and TupleTableSlot structures

2022-10-23 Thread Aleksander Alekseev
Hi hackers, > TupleTableSlot is a more abstract concept, being a container > for a tuple that can be present in several different forms. > It can contain a concrete tuple (HeapTupleData), or a "virtual" > tuple that is just an array of Datum+isnull values. The executor > usually uses tuple slots

Re: Pluggable toaster

2022-10-23 Thread Aleksander Alekseev
Hi Nikita, > Pluggable TOAST API was designed with storage flexibility in mind, and Custom > TOAST mechanics is > free to use any storage methods Don't you think that this is an arguable design decision? Basically all we know about the underlying TableAM is that it stores tuples _somehow_ and