[PATCH] Use RelationClose rather than table_close in heap_create_with_catalog

2023-03-18 Thread Xiaoran Wang
Hi hackers, In heap_create_with_catalog, the Relation new_rel_desc is created by RelationBuildLocalRelation, not table_open. So it's better to call RelationClose to release it. What's more, the comment for it seems useless, just delete it. Thanks! 0001-Use-RelationClose-rather-than-table_clos

Re: Allow logical replication to copy tables in binary format

2023-03-18 Thread vignesh C
On Fri, 17 Mar 2023 at 17:55, Melih Mutlu wrote: > > Hi, > > Sharing v17. > > Amit Kapila , 17 Mar 2023 Cum, 03:02 tarihinde şunu > yazdı: >> >> I think to reduce the risk of breakage, let's change the check to >> >=v16. Also, accordingly, update the doc and commit message. > > > Done. > > Peter

Re: Should we remove vacuum_defer_cleanup_age?

2023-03-18 Thread Alvaro Herrera
On 2023-Mar-17, Andres Freund wrote: > I started writing a test for vacuum_defer_cleanup_age while working on the fix > referenced above, but now I am wondering if said energy would be better spent > removing vacuum_defer_cleanup_age alltogether. +1 I agree it's not useful anymore. > I don't th

Re: Allow logical replication to copy tables in binary format

2023-03-18 Thread Peter Smith
On Fri, Mar 17, 2023 at 11:25 PM Melih Mutlu wrote: > > Hi, > > Sharing v17. > > Amit Kapila , 17 Mar 2023 Cum, 03:02 tarihinde şunu > yazdı: >> >> I think to reduce the risk of breakage, let's change the check to >> >=v16. Also, accordingly, update the doc and commit message. > > > Done. > Here

Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2023-03-18 Thread Amit Kapila
On Thu, Mar 16, 2023 at 2:15 PM Amit Kapila wrote: > > On Wed, Mar 15, 2023 at 9:12 AM Amit Kapila wrote: > > > > On Tue, Mar 14, 2023 at 3:18 PM Önder Kalacı wrote: > > >> > > > > Pushed this patch but forgot to add a new testfile. Will do that soon. > > > > The main patch is committed now. I t

Re: Allow logical replication to copy tables in binary format

2023-03-18 Thread Amit Kapila
On Sat, Mar 18, 2023 at 3:11 PM Peter Smith wrote: > > On Fri, Mar 17, 2023 at 11:25 PM Melih Mutlu wrote: > == > src/backend/replication/logical/tablesync.c > > 2. > @@ -1168,6 +1170,15 @@ copy_table(Relation rel) > > appendStringInfoString(&cmd, ") TO STDOUT"); > } > + > + /* The binary

Re: [PATCH] Clarify the behavior of the system when approaching XID wraparound

2023-03-18 Thread John Naylor
Thanks for picking up this badly-needed topic again! I was irresponsible last year and let it fall off my radar, but I'm looking at the patches, as well as revisiting discussions from the last four (!?) years that didn't lead to action. 0001: +In this condition the system can still execute re

Re: Initial Schema Sync for Logical Replication

2023-03-18 Thread Alvaro Herrera
On 2023-Mar-15, Kumar, Sachin wrote: > 1. In CreateSubscription() when we create replication > slot(walrcv_create_slot()), should > use CRS_EXPORT_SNAPSHOT, So that we can use this snapshot later in the > pg_dump. > > 2. Now we can call pg_dump with above snapshot from CreateSubscription. O

Re: BF mamba failure

2023-03-18 Thread Alexander Lakhin
Hi, 18.03.2023 07:26, Tom Lane wrote: Amit Kapila writes: Peter Smith has recently reported a BF failure [1]. AFAICS, the call stack of failure [2] is as follows: Note the assertion report a few lines further up: TRAP: failed Assert("pg_atomic_read_u32(&entry_ref->shared_entry->refcount) ==

Re: logical decoding and replication of sequences, take 2

2023-03-18 Thread Tomas Vondra
On 3/18/23 06:35, Amit Kapila wrote: > On Sat, Mar 18, 2023 at 3:13 AM Tomas Vondra > wrote: >> >> ... >> >> Clearly, for sequences we can't quite rely on snapshots/slots, we need >> to get the LSN to decide what changes to apply/skip from somewhere else. >> I wonder if we can just ignore the queu

Re: proposal: psql: psql variable BACKEND_PID

2023-03-18 Thread Andrew Dunstan
On 2023-02-16 Th 23:04, Pavel Stehule wrote: čt 16. 2. 2023 v 12:49 odesílatel Jelte Fennema napsal: On Thu, 16 Feb 2023 at 12:44, Pavel Stehule wrote: > To find and use pg_backend_pid is not rocket science. But use :BACKEND_PID is simpler. I wanted to call out that if

Re: proposal: psql: psql variable BACKEND_PID

2023-03-18 Thread Pavel Stehule
so 18. 3. 2023 v 16:24 odesílatel Andrew Dunstan napsal: > > On 2023-02-16 Th 23:04, Pavel Stehule wrote: > > > > čt 16. 2. 2023 v 12:49 odesílatel Jelte Fennema napsal: > >> On Thu, 16 Feb 2023 at 12:44, Pavel Stehule >> wrote: >> > To find and use pg_backend_pid is not rocket science. But use

Re: generate_series for timestamptz and time zone problem

2023-03-18 Thread Tom Lane
Pushed v7 after making a bunch of cosmetic changes. One gripe I had was that rearranging the logic in timestamptz_pl_interval[_internal] made it nearly impossible to see what functional changes you'd made there, while not really buying anything in return. I undid that to make the diff readable.

Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode

2023-03-18 Thread Justin Pryzby
> Subject: [PATCH v4 3/3] add vacuum[db] option to specify ring_size and guc > +Specifies the ring buffer size to be used for a given invocation of > +VACUUM or instance of autovacuum. This size is > +converted to a number of shared buffers which will be reused as part > o

Re: Infinite Interval

2023-03-18 Thread Tom Lane
Joseph Koshakow writes: > On Thu, Mar 9, 2023 at 12:42 PM Ashutosh Bapat > wrote: >> There are a lot of these diffs. PG code doesn't leave an extra space >> between variable name and *. > Those appeared from running pg_indent. I've removed them all. More specifically, those are from running pg_

Re: Infinite Interval

2023-03-18 Thread Joseph Koshakow
On Sat, Mar 18, 2023 at 3:08 PM Tom Lane wrote: > Joseph Koshakow writes: >> On Thu, Mar 9, 2023 at 12:42 PM Ashutosh Bapat < ashutosh.bapat@gmail.com> >> wrote: >>> There are a lot of these diffs. PG code doesn't leave an extra space >>> between variable name and *. > >> Those appeared from

Re: proposal: possibility to read dumped table's name from file

2023-03-18 Thread Pavel Stehule
Hi fresh rebase regards Pavel From 09c64d9a5f2ed033c2691ca25ca6bec23320e1b0 Mon Sep 17 00:00:00 2001 From: "ok...@github.com" Date: Thu, 16 Mar 2023 08:18:08 +0100 Subject: [PATCH] possibility to read options for dump from file --- doc/src/sgml/ref/pg_dump.sgml | 110 +++ doc/sr

Re: Infinite Interval

2023-03-18 Thread Tom Lane
Joseph Koshakow writes: > On Sat, Mar 18, 2023 at 3:08 PM Tom Lane wrote: >> More specifically, those are from running pg_indent with an obsolete >> typedefs list. > I must be doing something wrong because even after doing that I get the > same strange formatting. Specifically from the root dire

Re: Commitfest 2023-03 starting tomorrow!

2023-03-18 Thread Alvaro Herrera
On 2023-Mar-17, Greg Stark wrote: > I'm going to go ahead and do this today. Any of these patches that are > "Waiting on Author" and haven't received any emails or status changes > since March 1 I'm going to move out of the commitfest(*). So I've come around to thinking that booting patches out o

Re: Commitfest 2023-03 starting tomorrow!

2023-03-18 Thread Peter Geoghegan
On Sat, Mar 18, 2023 at 1:26 PM Alvaro Herrera wrote: > At this point, I'm going to suggest that reviewers should be open to the > idea of applying a submitted patch to some older Git commit in order to > review it. If we have given feedback, then it's OK to put a patch as > "waiting on author" a

Re: buildfarm + meson

2023-03-18 Thread Andrew Dunstan
On 2023-03-11 Sa 16:25, Andres Freund wrote: Hi, On 2023-03-09 18:31:10 -0500, Andrew Dunstan wrote: Another thing: the test for uuid.h is too strict. On Fedora 36 the OSSP header is in /usr/include, not /usr/include/ossp (I got around that for now by symlinking it, but obviously that's a nast

Re: Making background psql nicer to use in tap tests

2023-03-18 Thread Andrew Dunstan
On 2023-03-17 Fr 18:58, Andres Freund wrote: Hi, On 2023-03-17 12:25:14 -0400, Andrew Dunstan wrote: On 2023-03-17 Fr 10:08, Daniel Gustafsson wrote: If we are going to keep this as a separate package, then we should put some code in the constructor to prevent it being called from elsewhere

Bytea PL/Perl transform

2023-03-18 Thread Иван Панченко
Hi, PostgreSQL passes bytea arguments to PL/Perl functions as hexadecimal strings, which is not only inconvenient, but also memory and time consuming. So I decided to propose a simple transform extension to pass bytea as native Perl octet strings. Please find the patch attached.   Regards, Ivan

Re: Should vacuum process config file reload more often

2023-03-18 Thread Melanie Plageman
On Wed, Mar 15, 2023 at 1:14 AM Masahiko Sawada wrote: > On Sat, Mar 11, 2023 at 8:11 AM Melanie Plageman > wrote: > > I've implemented the atomic cost limit in the attached patch. Though, > > I'm pretty unsure about how I initialized the atomics in > > AutoVacuumShmemInit()... > > + >

Re: buildfarm + meson

2023-03-18 Thread Andres Freund
Hi, On 2023-03-18 17:53:38 -0400, Andrew Dunstan wrote: > On 2023-03-11 Sa 16:25, Andres Freund wrote: > > Hi, > > > > On 2023-03-09 18:31:10 -0500, Andrew Dunstan wrote: > > > Another thing: the test for uuid.h is too strict. On Fedora 36 the OSSP > > > header is in /usr/include, not /usr/includ

Re: Commitfest 2023-03 starting tomorrow!

2023-03-18 Thread Justin Pryzby
On Sat, Mar 18, 2023 at 02:43:38PM -0700, Peter Geoghegan wrote: > On Sat, Mar 18, 2023 at 1:26 PM Alvaro Herrera > wrote: > > At this point, I'm going to suggest that reviewers should be open to the > > idea of applying a submitted patch to some older Git commit in order to > > review it. If we

Re: Commitfest 2023-03 starting tomorrow!

2023-03-18 Thread Peter Geoghegan
On Sat, Mar 18, 2023 at 4:19 PM Justin Pryzby wrote: > The only issue with this is that cfbot has squished all the commits into > one, and lost the original commit messages (if any). I submitted > patches to address that but still waiting for feedback. > > https://www.postgresql.org/message-id/20

Re: Commitfest 2023-03 starting tomorrow!

2023-03-18 Thread Justin Pryzby
On Sat, Mar 18, 2023 at 04:28:02PM -0700, Peter Geoghegan wrote: > On Sat, Mar 18, 2023 at 4:19 PM Justin Pryzby wrote: > > The only issue with this is that cfbot has squished all the commits into > > one, and lost the original commit messages (if any). I submitted > > patches to address that but

Re: buildfarm + meson

2023-03-18 Thread Andrew Dunstan
On 2023-03-18 Sa 19:00, Andres Freund wrote: Hi, On 2023-03-18 17:53:38 -0400, Andrew Dunstan wrote: On 2023-03-11 Sa 16:25, Andres Freund wrote: Hi, On 2023-03-09 18:31:10 -0500, Andrew Dunstan wrote: Another thing: the test for uuid.h is too strict. On Fedora 36 the OSSP header is in /usr