Re: Extensible Rmgr for Table AMs

2021-11-09 Thread Jeff Davis
On Mon, 2021-11-08 at 15:36 -0800, Jeff Davis wrote: > The attached patch (against v14, so it's easier to test columnar) is > somewhat like a simplified version of [3] combined with refactoring > to > make decoding a part of the rmgr. I created a wiki page here:

Re: Printing backtrace of postgres processes

2021-11-09 Thread Bharath Rupireddy
On Tue, Nov 9, 2021 at 4:45 PM vignesh C wrote: > Thanks for reporting this, the attached v9 patch has the changes for the same. Thanks for the v9 patch. I have some comments: 1) I think we are moving away from if (!superuser()) checks, see the commit [1]. The goal is to let the GRANT-REVOKE

Re: Frontend error logging style

2021-11-09 Thread Kyotaro Horiguchi
At Tue, 09 Nov 2021 17:20:41 -0500, Tom Lane wrote in > ISTM that the recently-introduced new frontend logging support > (common/logging.h et al) could use a second pass now that we have > some experience with it. There are two points that are bugging me: > > 1. The distinction between

Re: 2021-11-11 release announcement draft

2021-11-09 Thread Noah Misch
On Tue, Nov 09, 2021 at 11:25:37AM -0500, Jonathan S. Katz wrote: > Attached please find a draft of the release announcement for 2021-11-11. > Please provide any feedback no later than Thu, Nov 11, 2021 0:00 AoE[1]. > Bug Fixes and Improvements > -- > > This update fixes

Re: Reuse of State value in Aggregates

2021-11-09 Thread Antonin Houska
gg pw wrote: > Do Aggregate functions/queries reuse the state value they generate for > subsequent queries? If not then an explanation would be greatly appreciated. The subsequent queries are not supposed to feed the same input into the aggregates, so their aggregate states will most likely

Re: Optionally automatically disable logical replication subscriptions on error

2021-11-09 Thread Greg Nancarrow
On Wed, Nov 10, 2021 at 12:26 PM osumi.takami...@fujitsu.com wrote: > > On Monday, November 8, 2021 10:15 PM vignesh C wrote: > > Thanks for the updated patch. Please create a Commitfest entry for this. It > > will > > help to have a look at CFBot results for the patch, also if required rebase

Re: Identify missing publications from publisher while create/alter subscription.

2021-11-09 Thread Bharath Rupireddy
On Tue, Nov 9, 2021 at 9:27 PM vignesh C wrote: > Attached v12 version is rebased on top of Head. Thanks for the patch. Here are some comments on v12: 1) I think ERRCODE_TOO_MANY_ARGUMENTS isn't the right error code, the ERRCODE_UNDEFINED_OBJECT is more meaningful. Please change. +

Re: Skipping logical replication transactions on subscriber side

2021-11-09 Thread vignesh C
On Sun, Nov 7, 2021 at 7:50 PM Masahiko Sawada wrote: > > On Wed, Nov 3, 2021 at 12:41 PM Amit Kapila wrote: > > > > On Tue, Nov 2, 2021 at 2:17 PM Masahiko Sawada > > wrote: > > > > > > On Tue, Nov 2, 2021 at 2:35 PM Amit Kapila > > > wrote: > > > > > > > > On Mon, Nov 1, 2021 at 7:18 AM

Re: row filtering for logical replication

2021-11-09 Thread Peter Smith
On Wed, Nov 10, 2021 at 4:57 PM houzj.f...@fujitsu.com wrote: > > On Wed, Nov 10, 2021 10:48 AM Amit Kapila wrote: > > On Tue, Nov 9, 2021 at 2:22 PM houzj.f...@fujitsu.com wrote: > > > > > > On Fri, Nov 5, 2021 4:49 PM Amit Kapila wrote: > > > > On Fri, Nov 5, 2021 at 10:44 AM Peter Smith >

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

2021-11-09 Thread Amit Kapila
On Tue, Nov 9, 2021 at 5:12 AM Jeff Davis wrote: > > On Fri, 2021-11-05 at 10:00 +0530, Amit Kapila wrote: > > I am not talking about decoding plugin but rather decoding itself, > > basically, the work we do in reorderbuffer.c, decode.c, etc. The two > > things I remember were tuple format and

Re: Removed unused import modules from tap tests

2021-11-09 Thread Michael Paquier
On Tue, Nov 09, 2021 at 09:48:30PM +0530, vignesh C wrote: > While trying to add some new tests, I found that > PostgreSQL::Test::Utils is not required. I felt > PostgreSQL::Test::Utils can be removed from a lot of tap tests which > do not require it. I removed it, ran the tests and found the

Reuse of State value in Aggregates

2021-11-09 Thread gg pw
Do Aggregate functions/queries reuse the state value they generate for subsequent queries? If not then an explanation would be greatly appreciated.

Re: Failed transaction statistics to measure the logical replication progress

2021-11-09 Thread Dilip Kumar
On Tue, Nov 9, 2021 at 5:05 PM osumi.takami...@fujitsu.com wrote: > > On Tuesday, November 9, 2021 12:08 PM Greg Nancarrow > wrote: > > On Fri, Nov 5, 2021 at 7:11 PM osumi.takami...@fujitsu.com > > wrote: > > > > > > > I did a quick scan through the latest v8 patch and noticed the following

Re: row filtering for logical replication

2021-11-09 Thread Amit Kapila
On Tue, Nov 9, 2021 at 2:22 PM houzj.f...@fujitsu.com wrote: > > On Fri, Nov 5, 2021 4:49 PM Amit Kapila wrote: > > On Fri, Nov 5, 2021 at 10:44 AM Peter Smith wrote: > > > > > > PSA new set of v37* patches. > > 3. > > - | ColId > > + | ColId OptWhereClause > > { > > $$ =

Re: Optionally automatically disable logical replication subscriptions on error

2021-11-09 Thread Greg Nancarrow
On Wed, Nov 10, 2021 at 3:22 PM Greg Nancarrow wrote: > > I had a look at this patch and have a couple of initial review > comments for some issues I spotted: > Incidentally, I found that the v3 patch only applies after the skip xid v20 patch [1] has been applied. [2] -

Re: row filtering for logical replication

2021-11-09 Thread Peter Smith
On Mon, Nov 8, 2021 at 5:53 PM houzj.f...@fujitsu.com wrote: > > 3) v37-0005 > > - no parse nodes of any kind other than Var, OpExpr, Const, BoolExpr, FuncExpr > > I think there could be other node type which can also be considered as simple > expression, for exmaple T_NullIfExpr. The current

RE: Optionally automatically disable logical replication subscriptions on error

2021-11-09 Thread osumi.takami...@fujitsu.com
On Monday, November 8, 2021 10:15 PM vignesh C wrote: > Thanks for the updated patch. Please create a Commitfest entry for this. It > will > help to have a look at CFBot results for the patch, also if required rebase > and > post a patch on top of Head. As requested, created a new entry for

Re: removing global variable ThisTimeLineID

2021-11-09 Thread Michael Paquier
On Tue, Nov 09, 2021 at 02:15:51PM -0500, Robert Haas wrote: > That's a good point. However, since I think newTLI is already in use > in some of the functions StartupXLOG() calls, and since I think it > would be good to use the same name in StartupXLOG() as in the > functions that it calls, what

RE: row filtering for logical replication

2021-11-09 Thread houzj.f...@fujitsu.com
On Wed, Nov 10, 2021 10:48 AM Amit Kapila wrote: > On Tue, Nov 9, 2021 at 2:22 PM houzj.f...@fujitsu.com wrote: > > > > On Fri, Nov 5, 2021 4:49 PM Amit Kapila wrote: > > > On Fri, Nov 5, 2021 at 10:44 AM Peter Smith wrote: > > > > > > > > PSA new set of v37* patches. > > > 3. > > > - | ColId >

Re: Improve error context after some failed XLogReadRecord()

2021-11-09 Thread Michael Paquier
On Tue, Nov 09, 2021 at 04:58:11PM +0900, Kyotaro Horiguchi wrote: > Otherwise it looks good to me. What you are proposing is better than what I had in those two contexts, so I have just used what you have suggested for both of them. Thanks! -- Michael signature.asc Description: PGP signature

[BUG]Invalidate relcache when setting REPLICA IDENTITY

2021-11-09 Thread tanghy.f...@fujitsu.com
Hi I think I found a bug related to logical replication(REPLICA IDENTITY in specific). If I change REPLICA IDENTITY after creating publication, the DELETE/UPDATE operations won't be replicated as expected. For example: -- publisher CREATE TABLE tbl(a int, b int); ALTER TABLE tbl ALTER COLUMN

RE: row filtering for logical replication

2021-11-09 Thread houzj.f...@fujitsu.com
On Thur, Nov 4, 2021 10:47 AM Peter Smith wrote: > PROPOSAL > > I propose that we change the way duplicate tables are processed to make it so > that it is always the *last* one that takes effect (instead of the *first* > one). AFAIK > doing this won't affect any current PG behaviour, but doing

Re: Deficient error handling in pg_dump and pg_basebackup

2021-11-09 Thread Michael Paquier
On Tue, Nov 09, 2021 at 03:20:31PM -0500, Tom Lane wrote: > I think it's right. This certainly isn't sanctioned by the zlib > specification [1], nor does it look like our other gzclose() calls, > which simply consult errno. (Note that this coding is not at all new, > but Coverity thinks it is

Re: On login trigger: take three

2021-11-09 Thread Greg Nancarrow
On Fri, Nov 5, 2021 at 3:03 PM Greg Nancarrow wrote: > > +1 > The arguments given are pretty convincing IMHO, and I agree that the > additions made in the v20 patch are not a good idea, and are not needed. > If there are no objections, I plan to reinstate the previous v19 patch (as v21),

RE: row filtering for logical replication

2021-11-09 Thread houzj.f...@fujitsu.com
On Fri, Nov 5, 2021 4:49 PM Amit Kapila wrote: > On Fri, Nov 5, 2021 at 10:44 AM Peter Smith wrote: > > > > PSA new set of v37* patches. > 3. > - | ColId > + | ColId OptWhereClause > { > $$ = makeNode(PublicationObjSpec); > $$->pubobjtype = PUBLICATIONOBJ_CONTINUATION; > - $$->name = $1; >

Re: [PROPOSAL] new diagnostic items for the dynamic sql

2021-11-09 Thread Pavel Stehule
Hi po 8. 11. 2021 v 9:57 odesílatel Dinesh Chemuduru napsal: > Thanks Zhihong/Pavel, > > On Mon, 8 Nov 2021 at 10:03, Pavel Stehule > wrote: > >> >> >> po 8. 11. 2021 v 5:24 odesílatel Pavel Stehule >> napsal: >> >>> >>> >>> po 8. 11. 2021 v 5:07 odesílatel Pavel Stehule >>> napsal: >>>

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

2021-11-09 Thread Kyotaro Horiguchi
At Tue, 9 Nov 2021 12:51:15 +0900, Michael Paquier wrote in > On Mon, Nov 08, 2021 at 05:55:16PM +0900, Kyotaro Horiguchi wrote: > > I have quickly looked at the patch set. > > > 0001: (I don't remember about this, though) I don't see how to make it > > work on Windows. Anyway the next step

Re: Missing include in be-secure-openssl.c?

2021-11-09 Thread 近藤雄太
On Mon, 08 Nov 2021 12:05:24 -0500 Tom Lane wrote: > I wrote: > > The rough idea I have is that prior to 8162464a2, we sucked in > > that #define during postgres.h and then OpenSSL's headers were > > able to undo it. After 8162464a2, we don't read > > during postgres.h, but some *other* header

Re: Skipping logical replication transactions on subscriber side

2021-11-09 Thread Masahiko Sawada
On Tue, Nov 9, 2021 at 7:04 PM Amit Kapila wrote: > > On Tue, Nov 9, 2021 at 12:13 PM Masahiko Sawada wrote: > > > > On Tue, Nov 9, 2021 at 3:08 PM Amit Kapila wrote: > > > > > > > > > 4. It seems now stats_reset entry is not present in > > > pg_stat_subscription_workers? How will users find

Re: Replication & recovery_min_apply_delay

2021-11-09 Thread Dilip Kumar
On Wed, Oct 27, 2021 at 1:01 AM Mahendra Singh Thalor wrote: > > > On Mon, 3 Aug 2020 at 15:02, Daniel Gustafsson wrote: >> >> This thread has stalled and the patch no longer applies, so I'm marking this >> Returned with Feedback. Please feel free to open a new entry if this patch >> is >>

RE: Failed transaction statistics to measure the logical replication progress

2021-11-09 Thread osumi.takami...@fujitsu.com
On Tuesday, November 9, 2021 12:08 PM Greg Nancarrow wrote: > On Fri, Nov 5, 2021 at 7:11 PM osumi.takami...@fujitsu.com > wrote: > > > > I did a quick scan through the latest v8 patch and noticed the following > things: I appreciate your review ! > src/backend/postmaster/pgstat.c > > (1)

RE: Failed transaction statistics to measure the logical replication progress

2021-11-09 Thread osumi.takami...@fujitsu.com
On Tuesday, November 9, 2021 8:35 PM I wrote: > Yes. I've rebased and updated the patch, paying attention to this point. > Attached the updated version. Forgot to note one thing. This is based on the skip xid v20 shared in [1] [1] -

Re: Skipping logical replication transactions on subscriber side

2021-11-09 Thread Amit Kapila
On Tue, Nov 9, 2021 at 12:13 PM Masahiko Sawada wrote: > > On Tue, Nov 9, 2021 at 3:08 PM Amit Kapila wrote: > > > > > > 4. It seems now stats_reset entry is not present in > > pg_stat_subscription_workers? How will users find that information if > > required? > > Users can find it in

Re: Printing backtrace of postgres processes

2021-11-09 Thread vignesh C
On Thu, Nov 4, 2021 at 4:06 PM Daniel Gustafsson wrote: > > > On 26 Aug 2021, at 16:56, vignesh C wrote: > > > The previous patch was failing because of the recent test changes made > > by commit 201a76183e2 which unified new and get_new_node, attached > > patch has the changes to handle the

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

2021-11-09 Thread Antonin Houska
Michail Nikolaev wrote: > > I understand that the RR snapshot is used to check the MVCC behaviour, > > however > > this comment seems to indicate that the RR snapshot should also prevent the > > standb from setting the hint bits. > > # Make sure previous queries not set the hints on standby

RE: Failed transaction statistics to measure the logical replication progress

2021-11-09 Thread osumi.takami...@fujitsu.com
On Monday, November 8, 2021 3:12 PM vignesh C wrote: > On Fri, Nov 5, 2021 at 1:42 PM osumi.takami...@fujitsu.com > wrote: > > Lastly, I removed one unnecessary test that checked publisher's stats > > in the TAP tests. > > Also I introduced ApplyTxnExtraData structure to remove void* argument >

Re: Added schema level support for publication.

2021-11-09 Thread Amit Kapila
On Tue, Nov 9, 2021 at 7:20 AM Peter Smith wrote: > > FYI - I spotted a trivial SQL mistake (?) of the schema publication patch > [1]. > > See the file describe.c, function describeOneTableDetails. > The new SQL has a 3rd UNION that looks like: > > ... > "UNION\n" > "SELECT pubname\n" > "FROM

Re: pg_rewind race condition just after promotion

2021-11-09 Thread Daniel Gustafsson
> On 14 Jul 2021, at 14:03, Aleksander Alekseev > wrote: > > The following review has been posted through the commitfest application: > make installcheck-world: tested, passed > Implements feature: tested, passed > Spec compliant: tested, passed > Documentation:

Re: parallel vacuum comments

2021-11-09 Thread Masahiko Sawada
On Fri, Nov 5, 2021 at 4:00 AM Andres Freund wrote: > > Hi, > > On 2021-11-01 10:44:34 +0900, Masahiko Sawada wrote: > > On Sun, Oct 31, 2021 at 6:21 AM Andres Freund wrote: > > > But even though we have this space optimized bitmap thing, we actually > > > need > > > more memory allocated

Re: pg_rewind copies

2021-11-09 Thread Daniel Gustafsson
> On 25 Mar 2021, at 14:32, David Steele wrote: > > On 1/22/21 8:26 AM, Heikki Linnakangas wrote: >> On 16/12/2020 00:08, Cary Huang wrote: >>> The following review has been posted through the commitfest application: >>> make installcheck-world: tested, passed >>> Implements feature:

Re: Commitfest 2021-11 Patch Triage - Part 2

2021-11-09 Thread Tom Lane
Daniel Gustafsson writes: > 2773: libpq compression > === > This patch intended to provide libpq connection compression to "replace SSL > compression" which was doomed when the patch was written, and have since been > removed altogether. The initial approach didn't get much

Re: Missing include in be-secure-openssl.c?

2021-11-09 Thread Tom Lane
=?ISO-2022-JP?B?GyRCNmFGI006QkAbKEI=?= writes: > On Mon, 08 Nov 2021 12:05:24 -0500 > Tom Lane wrote: >> This indeed seems to explain the compile failures, as hamerkop is >> now getting through the "make" stage. However, it's now failing >> in the plpython tests [1], apparently because Python

Re: CREATE ROLE IF NOT EXISTS

2021-11-09 Thread David Christensen
On Mon, Nov 8, 2021 at 1:22 PM Mark Dilger wrote: > > On Nov 8, 2021, at 10:38 AM, Stephen Frost wrote: > > > I don't quite follow this. The entire point of Alice writing a script > > that uses IF NOT EXISTS is to have that command not fail if, indeed, > > that role already exists, but for the

Re: CREATE ROLE IF NOT EXISTS

2021-11-09 Thread Mark Dilger
> On Nov 9, 2021, at 7:36 AM, David Christensen > wrote: > > If CINE semantics are at issue, what about the CREATE OR REPLACE semantics > with some sort of merge into the existing role? I don't care strongly about > which approach is taken, just think the overall "make this role exist in

Re: Skipping logical replication transactions on subscriber side

2021-11-09 Thread Amit Kapila
On Tue, Nov 9, 2021 at 1:10 PM Dilip Kumar wrote: > > On Tue, Nov 9, 2021 at 11:57 AM Amit Kapila wrote: > > > > On Tue, Nov 9, 2021 at 11:37 AM Dilip Kumar wrote: > > > 1. > > > I don't like the fact that this view is very specific for showing the > > > errors but the name of the view is very

Commitfest 2021-11 Patch Triage - Part 2

2021-11-09 Thread Daniel Gustafsson
Below is the second pass over the patches in the current commitfest, this time the patches which have been around for 5 or 6 commitfests. The usual disclaimers that I very well might have missed something still apply. 2773: libpq compression === This patch intended to

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

2021-11-09 Thread Michail Nikolaev
I have changed approach, so it is better to start from this email: https://www.postgresql.org/message-id/flat/CANtu0ohHu1r1xQfTzEJuxeaOMYncG7xRxUQWdH%3DcMXZSf%2Bnzvg%40mail.gmail.com#4c81a4d623d8152f5e8889e97e750eec

Re: pg_dump new feature: exporting functions only. Bad or good idea ?

2021-11-09 Thread Daniel Gustafsson
> On 30 Jul 2021, at 12:55, Lætitia Avrot wrote: > > > On Fri, Jul 9, 2021 at 4:43 PM Tomas Vondra > > wrote: > > > > The main question I have is whether this should include procedures. I'd > > probably argue procedures should be considered different from functions > > (i.e. requiring a

Re: An out-of-date comment in nodeIndexonlyscan.c

2021-11-09 Thread Daniel Gustafsson
This patch now fails to apply, probably due to a mostly trivial collision with fdd88571454e2b00dbe446e8609c6e4294ca89ae in the test files. Can you submit a rebased version? -- Daniel Gustafsson https://vmware.com/

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

2021-11-09 Thread Michail Nikolaev
Woo-hoo :) > Attached is a proposal for a minor addition that would make sense to me, add > it if you think it's appropriate. Yes, I'll add to the patch. > I think I've said enough, changing the status to "ready for committer" :-) Thanks a lot for your help and attention! Best regards,

Re: Add connection active, idle time to pg_stat_activity

2021-11-09 Thread Rafia Sabih
On Tue, 2 Nov 2021 at 09:00, Dilip Kumar wrote: > > On Tue, Oct 26, 2021 at 5:17 PM Rafia Sabih wrote: > > > > > > > > To provide this information I was digging into how the statistics > > > collector is working and found out there is already information like > > > total time that a connection

Re: Printing backtrace of postgres processes

2021-11-09 Thread vignesh C
On Tue, Oct 12, 2021 at 10:47 AM bt21tanigaway wrote: > > Hi, > > > The previous patch was failing because of the recent test changes made > > by commit 201a76183e2 which unified new and get_new_node, attached > > patch has the changes to handle the changes accordingly. > > Thanks for your

Re: [RFC] building postgres with meson -v

2021-11-09 Thread Peter Eisentraut
On 04.11.21 19:48, Andres Freund wrote: Probably worth putting this in fairly soon independent of whether anything happens wrt meson? OK, done. Let's see what happens. ;-)

Re: Identify missing publications from publisher while create/alter subscription.

2021-11-09 Thread vignesh C
On Tue, Sep 28, 2021 at 7:49 AM Jaime Casanova wrote: > > On Thu, Aug 26, 2021 at 07:49:49PM +0530, vignesh C wrote: > > On Thu, Jul 15, 2021 at 5:57 PM vignesh C wrote: > > > > > > On Tue, Jul 6, 2021 at 8:09 PM vignesh C wrote: > > > > > > > > On Wed, Jun 30, 2021 at 8:23 PM vignesh C wrote:

Re: CREATE ROLE IF NOT EXISTS

2021-11-09 Thread Stephen Frost
Greetings, * David Christensen (david.christen...@crunchydata.com) wrote: > On Mon, Nov 8, 2021 at 1:22 PM Mark Dilger > wrote: > > > > On Nov 8, 2021, at 10:38 AM, Stephen Frost wrote: > > > > > I don't quite follow this. The entire point of Alice writing a script > > > that uses IF NOT

Removed unused import modules from tap tests

2021-11-09 Thread vignesh C
Hi, While trying to add some new tests, I found that PostgreSQL::Test::Utils is not required. I felt PostgreSQL::Test::Utils can be removed from a lot of tap tests which do not require it. I removed it, ran the tests and found the tests to be executing fine. I have made a patch including the

2021-11-11 release announcement draft

2021-11-09 Thread Jonathan S. Katz
Hi, Attached please find a draft of the release announcement for 2021-11-11. Please provide any feedback no later than Thu, Nov 11, 2021 0:00 AoE[1]. Thanks! Jonathan [1] https://en.wikipedia.org/wiki/Anywhere_on_Earth The PostgreSQL Global Development Group has released an update to all

Re: CREATE ROLE IF NOT EXISTS

2021-11-09 Thread David Christensen
On Tue, Nov 9, 2021 at 10:22 AM Stephen Frost wrote: > Greetings, > > * David Christensen (david.christen...@crunchydata.com) wrote: > > Well, the CREATE OR REPLACE via just setting the role's attributes > > explicitly based on what you passed it could work (not strictly DROP + > > CREATE, in

Re: CREATE ROLE IF NOT EXISTS

2021-11-09 Thread Stephen Frost
Greetings, * Mark Dilger (mark.dil...@enterprisedb.com) wrote: > > On Nov 9, 2021, at 8:22 AM, Stephen Frost wrote: > > In terms of least-surprise, I do tend to think that the answer is "only > > care about what is explicitly put into the command"- that is, if it > > isn't in the CREATE ROLE

Re: Commitfest 2021-11 Patch Triage - Part 2

2021-11-09 Thread Pavel Stehule
Hi 2839: possibility to rename root namespace in plpgsql > = > This patch addresses a feature request for making plpgsql easier to work > with, > but the approach has been questioned with the thread stalling since March > in > one of these

Re: CREATE ROLE IF NOT EXISTS

2021-11-09 Thread Mark Dilger
> On Nov 9, 2021, at 8:50 AM, Stephen Frost wrote: > >> If we fix the existing bug that the pg_auth_members.grantor field can end up >> as a dangling reference, instead making sure that it is always accurate, >> then perhaps this would be ok if all roles granted into "charlie" had >>

Re: CREATE ROLE IF NOT EXISTS

2021-11-09 Thread Stephen Frost
Greetings, * Mark Dilger (mark.dil...@enterprisedb.com) wrote: > > On Nov 9, 2021, at 7:36 AM, David Christensen > > wrote: > > If CINE semantics are at issue, what about the CREATE OR REPLACE semantics > > with some sort of merge into the existing role? I don't care strongly > > about which

Re: CREATE ROLE IF NOT EXISTS

2021-11-09 Thread David Christensen
On Tue, Nov 9, 2021 at 9:55 AM Mark Dilger wrote: > > On Nov 9, 2021, at 7:36 AM, David Christensen < > david.christen...@crunchydata.com> wrote: > > > > If CINE semantics are at issue, what about the CREATE OR REPLACE > semantics with some sort of merge into the existing role? I don't care >

Re: CREATE ROLE IF NOT EXISTS

2021-11-09 Thread Mark Dilger
> On Nov 9, 2021, at 8:22 AM, Stephen Frost wrote: > > In terms of least-surprise, I do tend to think that the answer is "only > care about what is explicitly put into the command"- that is, if it > isn't in the CREATE ROLE statement then it gets left as-is. Not sure > how others feel about

Re: Commitfest 2021-11 Patch Triage - Part 2

2021-11-09 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Daniel Gustafsson writes: > > 2773: libpq compression > > === > > This patch intended to provide libpq connection compression to "replace SSL > > compression" which was doomed when the patch was written, and have since > >

Re: CREATE ROLE IF NOT EXISTS

2021-11-09 Thread Stephen Frost
Greetings, * David Christensen (david.christen...@crunchydata.com) wrote: > On Tue, Nov 9, 2021 at 9:55 AM Mark Dilger > wrote: > > > On Nov 9, 2021, at 7:36 AM, David Christensen < > > david.christen...@crunchydata.com> wrote: > > > If CINE semantics are at issue, what about the CREATE OR

Re: Predefined role pg_maintenance for VACUUM, ANALYZE, CHECKPOINT.

2021-11-09 Thread Stephen Frost
Greetings, * Jeff Davis (pg...@j-davis.com) wrote: > On Mon, 2021-11-08 at 12:47 -0500, Stephen Frost wrote: > > > > I don't feel as strongly as others apparently do on this point > > though, > > and I'd rather have non-superusers able to run CHECKPOINT *somehow* > > than not, so if the others

Re: 2021-11-11 release announcement draft

2021-11-09 Thread Erik Rijkers
Op 09-11-2021 om 17:25 schreef Jonathan S. Katz: Attached please find a draft of the release announcement for 2021-11-11. "overflowed-subsraction" should probably be "overflowed-subtraction" Erik

Re: 2021-11-11 release announcement draft

2021-11-09 Thread Jonathan S. Katz
On 11/9/21 12:10 PM, Erik Rijkers wrote: Op 09-11-2021 om 17:25 schreef Jonathan S. Katz: Attached please find a draft of the release announcement for 2021-11-11. "overflowed-subsraction"  should probably be "overflowed-subtraction" Actually it should be "overflowed-subtransaction" but

Re: amcheck's verify_heapam(), and HOT chain verification

2021-11-09 Thread Peter Geoghegan
On Sun, Nov 7, 2021 at 9:30 AM Mark Dilger wrote: > Yes, I am quite interested, though I will have to alternate between this work > and the various patch sets that I've already submitted for this development > cycle. Great! We still have a lot of work to do with HOT chain level invariants. I

Re: Support for NSS as a libpq TLS backend

2021-11-09 Thread Joshua Brindle
On Fri, Nov 5, 2021 at 6:01 AM Daniel Gustafsson wrote: > > Attached is a rebase fixing a tiny bug in the documentation which prevented it > from being able to compile. > Hello, I'm looking to help out with reviews for this CF and I'm currently looking at this patchset. currently I'm stuck

Re: refactoring basebackup.c

2021-11-09 Thread Robert Haas
On Mon, Nov 8, 2021 at 4:41 PM Robert Haas wrote: > On Mon, Nov 8, 2021 at 11:34 AM Robert Haas wrote: > > Anyway, here's my proposal for fixing the issue immediately before us. > > 0001 adds logic to pad out the unterminated tar archives, and 0002 > > makes the server terminate its tar archives

Deficient error handling in pg_dump and pg_basebackup

2021-11-09 Thread Tom Lane
Coverity complained about this code in bbstreamer_file.c, saying that the get_gz_error() call could be accessing freed memory: if (gzclose(mystreamer->gzfile) != 0) { pg_log_error("could not close compressed file \"%s\": %s", mystreamer->pathname,

Re: 2021-11-11 release announcement draft

2021-11-09 Thread Justin Pryzby
On Tue, Nov 09, 2021 at 11:25:37AM -0500, Jonathan S. Katz wrote: > * Fix is when creating a new range type with `CREATE TYPE` that could cause > problems for later event triggers or subsequent executions of the `CREATE > TYPE` > command. I don't know what "is when" means, but it seems wrong. >

Re: 2021-11-11 release announcement draft

2021-11-09 Thread Jonathan S. Katz
On 11/9/21 3:19 PM, Justin Pryzby wrote: On Tue, Nov 09, 2021 at 11:25:37AM -0500, Jonathan S. Katz wrote: * Fix is when creating a new range type with `CREATE TYPE` that could cause problems for later event triggers or subsequent executions of the `CREATE TYPE` command. I don't know what "is

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

2021-11-09 Thread Michail Nikolaev
Hello. > Attached is a proposal for a minor addition that would make sense to me, add > it if you think it's appropriate. Added. Also, I updated the documentation a little. > I have changed approach, so it is better to start from this email: Oops, I was thinking the comments feature in the

Re: removing global variable ThisTimeLineID

2021-11-09 Thread Robert Haas
On Mon, Nov 8, 2021 at 10:31 PM Michael Paquier wrote: > I think that this patch is an improvement. Cool. > @@ -6686,8 +6682,8 @@ StartupXLOG(void) > - TimeLineID ThisTimeLineID, > - PrevTimeLineID; > + TimeLineID replayTLI, > + newTLI; > One problem with

Re: Support for NSS as a libpq TLS backend

2021-11-09 Thread Joshua Brindle
On Tue, Nov 9, 2021 at 1:59 PM Joshua Brindle wrote: > > On Fri, Nov 5, 2021 at 6:01 AM Daniel Gustafsson wrote: > > > > Attached is a rebase fixing a tiny bug in the documentation which prevented > > it > > from being able to compile. > > > > Hello, I'm looking to help out with reviews for

RE: Commitfest 2021-11 Patch Triage - Part 2

2021-11-09 Thread Floris Van Nee
> Daniel Gustafsson writes: > > 2773: libpq compression > > === > > This patch intended to provide libpq connection compression to > > "replace SSL compression" which was doomed when the patch was > written, > > and have since been removed altogether. The initial approach

Re: Slow standby snapshot

2021-11-09 Thread Michail Nikolaev
Hello, Andrey. Thanks for your feedback. > Current patch addresses another problem. In presence of old enough > transaction enumeration of KnownAssignedXids with shared lock prevents adding > new transactions with exclusive lock. And recovery effectively pauses. Actually, I see two problems

Re: Support for NSS as a libpq TLS backend

2021-11-09 Thread Joshua Brindle
On Tue, Nov 9, 2021 at 2:02 PM Joshua Brindle wrote: > > On Tue, Nov 9, 2021 at 1:59 PM Joshua Brindle > wrote: > > > > On Fri, Nov 5, 2021 at 6:01 AM Daniel Gustafsson wrote: > > > > > > Attached is a rebase fixing a tiny bug in the documentation which > > > prevented it > > > from being able

Re: Commitfest 2021-11 Patch Triage - Part 2

2021-11-09 Thread Andrew Dunstan
On 11/9/21 09:12, Daniel Gustafsson wrote: > > 2901: SQL/JSON: functions > 2901: SQL/JSON: JSON_TABLE > == > Grouping these two together as they are in very similar states. The patches > seems to mostly move forward by rebases fixing smaller things. Andrew, do you >

Did this add to the "ways in which [HeapTupleData] is used"?

2021-11-09 Thread Chapman Flack
Hi, I notice, belatedly, that 141fd1b tweaked the order of some members of struct catctup, moving c_list and my_cache from earlier locations to the end of the struct. [0] That resulted in this sequence at the end of the struct: ... HeapTupleData tuple;/* tuple management header */

Frontend error logging style

2021-11-09 Thread Tom Lane
ISTM that the recently-introduced new frontend logging support (common/logging.h et al) could use a second pass now that we have some experience with it. There are two points that are bugging me: 1. The distinction between "error" and "fatal" levels seems squishy to the point of uselessness. I

Clean up build warnings of plperl with clang-12+

2021-11-09 Thread Michael Paquier
Hi all, This is a follow-up of the discussion that happened here: https://www.postgresql.org/message-id/yyojyo475dsqy...@paquier.xyz Recently, we are getting warnings in the build of plperl when using at least clang-12 because of their new flag -Wcompound-token-split-by-macro, all the warnings

Re: prevent immature WAL streaming

2021-11-09 Thread Tom Lane
I wrote: > Seems like this hasn't fixed the problem: skink still fails on > this test occasionally. > # Failed test '00010002 differs from > 00010002' > # at t/026_overwrite_contrecord.pl line 61. This is still happening off and on, which makes it look like a

Re: Commitfest 2021-11 Patch Triage - Part 2

2021-11-09 Thread Bruce Momjian
On Tue, Nov 9, 2021 at 12:43:20PM -0500, Stephen Frost wrote: > * Tom Lane (t...@sss.pgh.pa.us) wrote: > > Daniel Gustafsson writes: > > I'm not Robert, but I still have an opinion here, and that it's that this > > feature would at best be an attractive nuisance. If you need compression > > on

Re: Unnecessary delay in streaming replication due to replay lag

2021-11-09 Thread Soumyadeep Chakraborty
Hi Michael, Thanks for the detailed review! Attached is a rebased patch that addresses most of the feedback. On Mon, Nov 8, 2021 at 1:41 AM Michael Paquier wrote: > +static void > +StartWALReceiverEagerly() > +{ > The patch fails to apply because of the recent changes from Robert to >

Re: row filtering for logical replication

2021-11-09 Thread Peter Smith
On Mon, Nov 8, 2021 at 5:53 PM houzj.f...@fujitsu.com wrote: > > On Fri, Nov 5, 2021 1:14 PM Peter Smith wrote: > > PSA new set of v37* patches. > > Thanks for updating the patches. > Few comments: > > 1) v37-0001 > > I think it might be better to also show the filter expression in '\d+ >

Re: row filtering for logical replication

2021-11-09 Thread Peter Smith
On Fri, Nov 5, 2021 at 7:49 PM Amit Kapila wrote: > > 2. > +preprocess_pubobj_list(List *pubobjspec_list, core_yyscan_t > yyscanner, bool alter_drop) > { > ListCell *cell; > PublicationObjSpec *pubobj; > @@ -17341,7 +17359,15 @@ preprocess_pubobj_list(List *pubobjspec_list, > core_yyscan_t

Re: row filtering for logical replication

2021-11-09 Thread Peter Smith
On Tue, Nov 9, 2021 at 2:03 PM tanghy.f...@fujitsu.com wrote: > > On Friday, November 5, 2021 1:14 PM, Peter Smith > wrote: > > > > PSA new set of v37* patches. > > > > Thanks for your patch. I have a problem when using this patch. > > The document about "create publication" in patch says: > >

Re: row filtering for logical replication

2021-11-09 Thread Peter Smith
On Thu, Nov 4, 2021 at 2:21 PM houzj.f...@fujitsu.com wrote: > > 3) > > + oldctx = > MemoryContextSwitchTo(CacheMemoryContext); > + rfnode = > stringToNode(TextDatumGetCString(rfdatum)); > +