Re: [PoC] Improve dead tuple storage for lazy vacuum

2023-02-21 Thread John Naylor
On Wed, Feb 22, 2023 at 1:16 PM Masahiko Sawada wrote: > > On Mon, Feb 20, 2023 at 2:56 PM Masahiko Sawada wrote: > > > > Yeah, I did a similar thing in an earlier version of tidstore patch. Okay, if you had checks against the old array lookup in development, that gives us better confidence. >

Re: [PATCH] Add pretty-printed XML output option

2023-02-21 Thread Peter Smith
Here are some review comments for patch v15-0001 FYI, the patch applies clean and tests OK for me. == doc/src/sgml/datatype.sgml 1. XMLSERIALIZE ( { DOCUMENT | CONTENT } value AS type [ { NO INDENT | INDENT } ] ) ~ Another/shorter way to write that syntax is like below. For me, it is

Re: [PATCH] Add pretty-printed XML output option

2023-02-21 Thread Nikolay Samokhvalov
On Mon, Feb 20, 2023 at 3:06 PM Jim Jones wrote: > As suggested by Peter and Nikolay, v15 now removes the xmlformat > function from the catalog and adds the [NO] INDENT option to > xmlserialize, as described in X069.\ > Great. I'm checking this patch and it seems, indentation stops working if

RE: Allow logical replication to copy tables in binary format

2023-02-21 Thread Hayato Kuroda (Fujitsu)
Dear Melih, Thank you for updating the patch! Followings are my comments. 01. catalogs.sgml ``` If true, the subscription will request that the publisher send data - in binary format ``` I'm not clear here. subbinary does not directly mean that whether the worker requests to send

Re: [PoC] Federated Authn/z with OAUTHBEARER

2023-02-21 Thread Andrey Chudnovsky
Thanks for the feedback, > Having skimmed back through this thread again, I still feel that the > direction that was originally being taken (actually support something in > libpq and the backend, be it with libiddawc or something else or even > our own code, and not just throw hooks in various

Re: Commitfest Manager

2023-02-21 Thread Michael Paquier
On Tue, Feb 21, 2023 at 02:13:08PM -0500, Tom Lane wrote: > Greg Stark writes: >> On Tue, 21 Feb 2023 at 12:29, Tom Lane wrote: >>> Greg Stark writes: >>> We've generally thought that the manager for the last CF of a cycle >>> needs to be someone with experience. > >> Hm. Was that in response

Re: We shouldn't signal process groups with SIGQUIT

2023-02-21 Thread Michael Paquier
On Tue, Feb 14, 2023 at 12:47:12PM -0800, Andres Freund wrote: > Just naively hacking this behaviour change into the current code, would yield > sending SIGQUIT to postgres, and then SIGTERM to the whole process > group. Which seems like a reasonable order? quickdie() should _exit() > immediately

Re: pg_upgrade and logical replication

2023-02-21 Thread Julien Rouhaud
On Mon, Feb 20, 2023 at 03:07:37PM +0800, Julien Rouhaud wrote: > On Mon, Feb 20, 2023 at 11:07:42AM +0530, Amit Kapila wrote: > > > > I think the current mechanism tries to provide more flexibility to the > > users. OTOH, in some of the cases where users don't want to change > > anything in the

Re: "out of relcache_callback_list slots" after multiple calls to pg_logical_slot_get_binary_changes

2023-02-21 Thread Michael Paquier
On Wed, Feb 22, 2023 at 12:07:06PM +0900, Kyotaro Horiguchi wrote: > At Wed, 22 Feb 2023 12:29:59 +1100, Peter Smith wrote > in >> If you are going to do that, then won't just copying the >> CacheRegisterSyscacheCallback(PUBLICATIONOID... into function >> init_rel_sync_cache() be effectively

Re: [PoC] Improve dead tuple storage for lazy vacuum

2023-02-21 Thread Masahiko Sawada
On Mon, Feb 20, 2023 at 2:56 PM Masahiko Sawada wrote: > > On Thu, Feb 16, 2023 at 6:23 PM John Naylor > wrote: > > > > On Thu, Feb 16, 2023 at 10:24 AM Masahiko Sawada > > wrote: > > > > > > On Tue, Feb 14, 2023 at 8:24 PM John Naylor > > > wrote: > > > > > > > I can think that something

Re: psql memory leaks

2023-02-21 Thread Michael Paquier
On Tue, Feb 21, 2023 at 02:03:43PM -0500, Corey Huinker wrote: > Good catch. Patch passes make check-world. Indeed. I was reviewing the whole and there could be a point in resetting bind_nparams at the end of SendQuery() to keep a correct track of what's saved in the pset data for the bind

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

2023-02-21 Thread Hayato Kuroda (Fujitsu)
Dear Peter, Thank you for reviewing! PSA new version. > 1. > The other possibility was to apply the delay at the end of the parallel apply > transaction but that would cause issues related to resource bloat and > locks being > held for a long time. > > ~ > > The reply [1] for review comment #2

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

2023-02-21 Thread Justin Pryzby
On Tue, Feb 21, 2023 at 07:50:35PM -0600, Justin Pryzby wrote: > On Sat, Feb 11, 2023 at 10:24:37AM -0800, Andres Freund wrote: > > On 2023-02-08 21:03:19 -0800, Andres Freund wrote: > > > Pushed the first (and biggest) commit. More tomorrow. > > > > Just pushed the actual pg_stat_io view, the

Re: DDL result is lost by CREATE DATABASE with WAL_LOG strategy

2023-02-21 Thread Michael Paquier
On Tue, Feb 21, 2023 at 10:00:11AM -0800, Nathan Bossart wrote: > What is the purpose of testing it without the checkpoint? Perhaps none, I was wondering whether it would be worth testing that with the flush phase, but perhaps that's just extra cycles wasted at this point. > Other than that >

Re: "out of relcache_callback_list slots" after multiple calls to pg_logical_slot_get_binary_changes

2023-02-21 Thread Kyotaro Horiguchi
Thanks for the comment. At Wed, 22 Feb 2023 12:29:59 +1100, Peter Smith wrote in > On Wed, Feb 22, 2023 at 12:03 PM Kyotaro Horiguchi > wrote: > > > > At Tue, 21 Feb 2023 10:31:29 +, "shiy.f...@fujitsu.com" > > wrote in > > > Thanks for your reply. I agree that's expensive. Attach a new

Re: Refactor calculations to use instr_time

2023-02-21 Thread Kyotaro Horiguchi
At Tue, 21 Feb 2023 16:11:19 +0300, Nazir Bilal Yavuz wrote in > I agree. The patch is updated. Thanks, that part looks good to me. I'd like to provide some additional comments. PgStat_PendingStats should be included in typedefs.list. + * Created for accumulating wal_write_time and

Re: Add support for unit "B" to pg_size_pretty()

2023-02-21 Thread David Rowley
On Wed, 22 Feb 2023 at 12:47, Peter Eisentraut wrote: > >> diff --git a/src/backend/utils/adt/dbsize.c > >> b/src/backend/utils/adt/dbsize.c > >> index dbd404101f..9ecd5428c3 100644 > >> --- a/src/backend/utils/adt/dbsize.c > >> +++ b/src/backend/utils/adt/dbsize.c > >> @@ -49,6 +49,7 @@ struct

Re: logical decoding and replication of sequences, take 2

2023-02-21 Thread Jonathan S. Katz
Hi, On 2/16/23 10:50 AM, Tomas Vondra wrote: Hi, Here's a rebased patch, without the last bit which is now unnecessary thanks to c981d9145dea. Thanks for continuing to work on this patch! I tested the latest version and have some feedback/clarifications. I did some testing using a

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

2023-02-21 Thread Justin Pryzby
On Sat, Feb 11, 2023 at 10:24:37AM -0800, Andres Freund wrote: > On 2023-02-08 21:03:19 -0800, Andres Freund wrote: > > Pushed the first (and biggest) commit. More tomorrow. > > Just pushed the actual pg_stat_io view, the splitting of the tablespace test, > and the pg_stat_io tests. pg_stat_io

Re: Reducing System Allocator Thrashing of ExecutorState to Alleviate FDW-related Performance Degradations

2023-02-21 Thread David Rowley
On Sat, 18 Feb 2023 at 06:52, Andres Freund wrote: > And did you increase ALLOCSET_DEFAULT_INITSIZE everywhere, or just passed a > larger block size in CreateExecutorState()? If the latter,the context > freelist wouldn't even come into play. I think this piece of information is critical to

Re: "out of relcache_callback_list slots" after multiple calls to pg_logical_slot_get_binary_changes

2023-02-21 Thread Peter Smith
On Wed, Feb 22, 2023 at 12:03 PM Kyotaro Horiguchi wrote: > > At Tue, 21 Feb 2023 10:31:29 +, "shiy.f...@fujitsu.com" > wrote in > > Thanks for your reply. I agree that's expensive. Attach a new patch which > > adds a > > static boolean to avoid duplicate registration. > > Thank you for

Re: "out of relcache_callback_list slots" after multiple calls to pg_logical_slot_get_binary_changes

2023-02-21 Thread Kyotaro Horiguchi
At Tue, 21 Feb 2023 10:31:29 +, "shiy.f...@fujitsu.com" wrote in > Thanks for your reply. I agree that's expensive. Attach a new patch which > adds a > static boolean to avoid duplicate registration. Thank you for the patch. It is exactly what I had in my mind. But now that I've had a

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

2023-02-21 Thread Peter Smith
Here are some very minor review comments for the patch v4-0001 == Commit Message 1. The other possibility was to apply the delay at the end of the parallel apply transaction but that would cause issues related to resource bloat and locks being held for a long time. ~ The reply [1] for

Re: Fix the description of GUC "max_locks_per_transaction" and "max_pred_locks_per_transaction" in guc_table.c

2023-02-21 Thread Nathan Bossart
On Wed, Feb 15, 2023 at 08:16:43AM +, wangw.f...@fujitsu.com wrote: > When I refer to the GUC "max_locks_per_transaction", I find that the > description > of the shared lock table size in pg-doc[1] is inconsistent with the code > (guc_table.c). BTW, the GUC "max_predicate_locks_per_xact" has

Re: odd buildfarm failure - "pg_ctl: control file appears to be corrupt"

2023-02-21 Thread Thomas Munro
On Fri, Feb 17, 2023 at 4:21 PM Thomas Munro wrote: > While contemplating what else a mandatory file lock might break, I > remembered that basebackup.c also reads the control file. Hrmph. Not > addressed yet; I guess it might need to acquire/release around > sendFile(sink, XLOG_CONTROL_FILE,

Re: Possible false valgrind error reports

2023-02-21 Thread Tom Lane
Karina Litskevich writes: > Thank you, I moved comment changes to 0001 and rewrote the fix through Min(). Looks good. I pushed it after a little more fiddling with the comments. Thanks for the report and patch! regards, tom lane

Re: Add support for unit "B" to pg_size_pretty()

2023-02-21 Thread Peter Eisentraut
On 20.02.23 15:34, Justin Pryzby wrote: On Mon, Feb 20, 2023 at 07:44:15AM +0100, Peter Eisentraut wrote: This patch adds support for the unit "B" to pg_size_pretty(). This makes it It seems like what it actually does is to support "B" in pg_size_bytes() - is that what you meant ? yes

Auth extensions, with an LDAP/SCRAM example [was: Proposal: Support custom authentication methods using hooks]

2023-02-21 Thread Jacob Champion
(Splitting off a new thread, and mostly clearing the CC list so people can escape if they want, because this is a heckuva tangent.) TL;DR: the attached patchset lets you authenticate with Postgres by forwarding SCRAM authentication to a backend LDAP server, and I use it to make arguments for

Re: refactoring relation extension and BufferAlloc(), faster COPY

2023-02-21 Thread Jim Nasby
On 2/21/23 3:12 PM, Andres Freund wrote: CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. Hi, On 2023-02-21 15:00:15 -0600, Jim Nasby wrote: Some food for thought: I

Re: [PoC] Federated Authn/z with OAUTHBEARER

2023-02-21 Thread Jacob Champion
On Mon, Feb 20, 2023 at 2:35 PM Stephen Frost wrote: > Having skimmed back through this thread again, I still feel that the > direction that was originally being taken (actually support something in > libpq and the backend, be it with libiddawc or something else or even > our own code, and not

Re: pg_dump: Remove some dead code

2023-02-21 Thread Tom Lane
Peter Eisentraut writes: > I have found that the per-column atttypmod tracking in pg_dump isn't > actually used anywhere. (The values are read but not used for writing > out any commands.) This is because some time ago we started formatting > all types through format_type() on the server.

Re: psql: Add role's membership options to the \du+ command

2023-02-21 Thread David G. Johnston
On Tue, Feb 21, 2023 at 2:14 PM Pavel Luzanov wrote: > On 17.02.2023 19:53, David G. Johnston wrote: > > On Fri, Feb 17, 2023 at 4:02 AM Pavel Luzanov > wrote: > >>List of roles >> Role name | Attributes | >>

pg_dump: Remove some dead code

2023-02-21 Thread Peter Eisentraut
I have found that the per-column atttypmod tracking in pg_dump isn't actually used anywhere. (The values are read but not used for writing out any commands.) This is because some time ago we started formatting all types through format_type() on the server. So this dead code can be

Re: psql: Add role's membership options to the \du+ command

2023-02-21 Thread Pavel Luzanov
On 17.02.2023 19:53, David G. Johnston wrote: On Fri, Feb 17, 2023 at 4:02 AM Pavel Luzanov wrote:                                List of roles  Role name | Attributes | Member of

Re: refactoring relation extension and BufferAlloc(), faster COPY

2023-02-21 Thread Andres Freund
Hi, On 2023-02-21 15:00:15 -0600, Jim Nasby wrote: > On 10/28/22 9:54 PM, Andres Freund wrote: > > b) I found that is quite beneficial to bulk-extend the relation with > > smgrextend() even without concurrency. The reason for that is the > > primarily > > the aforementioned dirty buffers

Re: refactoring relation extension and BufferAlloc(), faster COPY

2023-02-21 Thread Jim Nasby
On 10/28/22 9:54 PM, Andres Freund wrote: b) I found that is quite beneficial to bulk-extend the relation with smgrextend() even without concurrency. The reason for that is the primarily the aforementioned dirty buffers that our current extension method causes. One bit that stumped

Re: [PATCH] Fix unbounded authentication exchanges during PQconnectPoll()

2023-02-21 Thread Heikki Linnakangas
On 14/02/2023 01:22, Jacob Champion wrote: Hello, This is closely related to the prior conversation at [1]. There are a couple places in CONNECTION_AWAITING_RESPONSE where libpq will read a huge number of bytes from a server that we really should have hung up on. The attached patch adds a

Re: refactoring relation extension and BufferAlloc(), faster COPY

2023-02-21 Thread Andres Freund
Hi, On 2023-02-21 18:18:02 +0200, Heikki Linnakangas wrote: > > v2-0007-bufmgr-Move-relation-extension-handling-into-Bulk.patch > > > +static BlockNumber > > +BulkExtendSharedRelationBuffered(Relation rel, > > +SMgrRelation > > smgr, >

Re: Commitfest Manager

2023-02-21 Thread Tom Lane
Greg Stark writes: > On Tue, 21 Feb 2023 at 12:29, Tom Lane wrote: >> Greg Stark writes: >>> Is anyone else itching to be CF manager for March? If anyone new wants >>> to try it out that would be good. >>> >>> Assuming otherwise I'll volunteer. >> We've generally thought that the manager for

Re: psql memory leaks

2023-02-21 Thread Corey Huinker
On Mon, Feb 20, 2023 at 9:56 PM Kyotaro Horiguchi wrote: > I noticed that \bind is leaking memory for each option. > > =# SELECT $1, $2, $3 \ bind 1 2 3 \g > > The leaked memory blocks are comming from > psql_scan_slash_option(). The attached small patch resolves that > issue. I looked through

Re: Commitfest Manager

2023-02-21 Thread Greg Stark
On Tue, 21 Feb 2023 at 12:29, Tom Lane wrote: > > Greg Stark writes: > > Is anyone else itching to be CF manager for March? If anyone new wants > > to try it out that would be good. > > > Assuming otherwise I'll volunteer. > > We've generally thought that the manager for the last CF of a cycle >

Re: refactoring relation extension and BufferAlloc(), faster COPY

2023-02-21 Thread Andres Freund
Hi, On 2023-02-21 17:40:31 +0200, Heikki Linnakangas wrote: > > v2-0006-bufmgr-Support-multiple-in-progress-IOs-by-using-.patch > > This looks straightforward. My only concern is that it changes the order > that things happen at abort. Currently, AbortBufferIO() is called very early > in

Re: DDL result is lost by CREATE DATABASE with WAL_LOG strategy

2023-02-21 Thread Nathan Bossart
On Tue, Feb 21, 2023 at 03:13:10PM +0900, Michael Paquier wrote: > The test enforces a checkpoint after the table creation on the > template, so what about testing it also without a checkpoint, like the > extended version attached? I have tweaked a few things in the test, > while on it. What is

Re: Commitfest Manager

2023-02-21 Thread Tom Lane
Greg Stark writes: > Is anyone else itching to be CF manager for March? If anyone new wants > to try it out that would be good. > Assuming otherwise I'll volunteer. We've generally thought that the manager for the last CF of a cycle needs to be someone with experience.

Re: refactoring relation extension and BufferAlloc(), faster COPY

2023-02-21 Thread Alvaro Herrera
On 2023-Feb-21, Heikki Linnakangas wrote: > > +static BlockNumber > > +BulkExtendSharedRelationBuffered(Relation rel, > > +SMgrRelation > > smgr, > > +bool > >

Re: pgbench: using prepared BEGIN statement in a pipeline could cause an error

2023-02-21 Thread Alvaro Herrera
On 2023-Feb-20, Alvaro Herrera wrote: > Found one last problem: if you do "-f foobar.sql -M prepared" in that > order, then the prepare fails because the statement names would not be > assigned when the file is parsed. This coding only supported doing > "-M prepared -f foobar.sql", which funnily

Re: meson: Non-feature feature options

2023-02-21 Thread Nazir Bilal Yavuz
Hi, On Mon, 20 Feb 2023 at 22:42, Andres Freund wrote: > On 2023-02-20 19:53:53 +0100, Peter Eisentraut wrote: > > On 20.02.23 13:33, Nazir Bilal Yavuz wrote: > > > I added SSL and UUID patches. UUID patch has two different fixes: > > > > > > 1 - v1-0002-meson-Refactor-UUID-option.patch: Adding

Re: refactoring relation extension and BufferAlloc(), faster COPY

2023-02-21 Thread Heikki Linnakangas
v2-0007-bufmgr-Move-relation-extension-handling-into-Bulk.patch +static BlockNumber +BulkExtendSharedRelationBuffered(Relation rel, +SMgrRelation smgr, +bool

Commitfest Manager

2023-02-21 Thread Greg Stark
Is anyone else itching to be CF manager for March? If anyone new wants to try it out that would be good. Assuming otherwise I'll volunteer. -- greg

Unable to create table of view row type

2023-02-21 Thread Isaac Morland
I thought I should be able to do this: => create view testv as values (1, 'a'), (2, 'b'), (3, 'c'); CREATE VIEW => create table testt of testv; ERROR: type testv is not a composite type But as you can see I can’t. pg_type seems to think the type is composite: ijmorlan=> select typtype from

Re: refactoring relation extension and BufferAlloc(), faster COPY

2023-02-21 Thread Heikki Linnakangas
v2-0006-bufmgr-Support-multiple-in-progress-IOs-by-using-.patch This looks straightforward. My only concern is that it changes the order that things happen at abort. Currently, AbortBufferIO() is called very early in AbortTransaction(), and this patch moves it much later. I don't see any

Re: refactoring relation extension and BufferAlloc(), faster COPY

2023-02-21 Thread Heikki Linnakangas
On 11/02/2023 23:36, Andres Freund wrote: On 2023-02-11 23:03:56 +0200, Heikki Linnakangas wrote: * I don't understand this comment: /* * Clear out the buffer's tag and flags and usagecount. We must do * this to ensure that linear scans of the buffer array don't

Missing llvm_leave_fatal_on_oom() call

2023-02-21 Thread Heikki Linnakangas
llvm_release_context() calls llvm_enter_fatal_on_oom(), but it never calls llvm_leave_fatal_on_oom(). Isn't that a clear leak? (spotted this while investigating https://www.postgresql.org/message-id/a53cacb0-8835-57d6-31e4-4c5ef196d...@deepbluecap.com, but it seems unrelated) - Heikkidiff

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

2023-02-21 Thread Önder Kalacı
Hi Amit, all Amit Kapila , 15 Şub 2023 Çar, 07:37 tarihinde şunu yazdı: > On Wed, Feb 15, 2023 at 9:23 AM shiy.f...@fujitsu.com > wrote: > > > > On Sat, Feb 4, 2023 7:24 PM Amit Kapila wrote: > > > > > > On Thu, Feb 2, 2023 at 2:03 PM Önder Kalacı > wrote: > > > > > > > > On v23, I dropped

Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

2023-02-21 Thread Aleksander Alekseev
Hi, > The convert_pg_xact_segments() function is still obviously > overengineered. As I understand, all it has to do is simply renaming > pg_xact/ to pg_xact/. Unfortunately I used up all the > mana for today and have to take a long rest in order to continue. PFA the corrected

Re: Allow logical replication to copy tables in binary format

2023-02-21 Thread Bharath Rupireddy
On Mon, Feb 20, 2023 at 5:17 PM Melih Mutlu wrote: > > Thanks for letting me know. > Attached the fixed version of the patch. Thanks. I have few comments on v9 patch: 1. +/* Do not allow binary = false with copy_format = binary */ +if (!opts.binary && +

Re: Refactor calculations to use instr_time

2023-02-21 Thread Nazir Bilal Yavuz
Hi, Thanks for the review. On Mon, 20 Feb 2023 at 06:01, Kyotaro Horiguchi wrote: > > At Fri, 17 Feb 2023 13:53:36 +0300, Nazir Bilal Yavuz > wrote in > > Thanks for the review. I updated the patch. > > > WalUsageAccumDiff(, , ); > - PendingWalStats.wal_records =

Re: meson logs environment

2023-02-21 Thread Andrew Dunstan
On 2023-02-21 Tu 05:27, Nazir Bilal Yavuz wrote: Hi, On Tue, 21 Feb 2023 at 04:48, Andrew Dunstan wrote: I've noticed that `meson test` logs the complete environment in meson_logs/testlog.txt. That seems unnecessary and probably undesirable for the buildfarm client. Is there any way to

Re: Parallel Bitmap Heap Scan reports per-worker stats in EXPLAIN ANALYZE

2023-02-21 Thread David Geier
Hi, On 1/20/23 09:34, David Geier wrote: EXPLAIN ANALYZE for parallel Bitmap Heap Scans currently only reports the number of heap blocks processed by the leader. It's missing the per-worker stats. The attached patch adds that functionality in the spirit of e.g. Sort or Memoize. Here is a

RE: "out of relcache_callback_list slots" after multiple calls to pg_logical_slot_get_binary_changes

2023-02-21 Thread shiy.f...@fujitsu.com
On Mon, Feb 20, 2023 11:31 PM Tom Lane wrote: > > Kyotaro Horiguchi writes: > > I'm pretty sure that everytime an output plugin is initialized on a > > process, it installs the same set of syscache/relcache callbacks each > > time. Do you think we could simply stop duplicate registration of >

Re: meson logs environment

2023-02-21 Thread Nazir Bilal Yavuz
Hi, On Tue, 21 Feb 2023 at 04:48, Andrew Dunstan wrote: > > > I've noticed that `meson test` logs the complete environment in > meson_logs/testlog.txt. That seems unnecessary and probably undesirable for > the buildfarm client. Is there any way to suppress that, or at least only > print some

Re: Seek for helper documents to implement WAL with an FDW

2023-02-21 Thread Bharath Rupireddy
On Tue, Feb 21, 2023 at 3:01 PM Komal Habura wrote: > > Hi all, > I have written an FDW, which is similar to the file_fdw. I need the > support of WAL to perform logical and stream replication. I have knowledge > about custom WAL but do not have clarity about implementing WAL(writing,

Re: Incorrect command tag row count for MERGE with a cross-partition update

2023-02-21 Thread Alvaro Herrera
On 2023-Feb-20, Dean Rasheed wrote: > Playing around with MERGE some more, I noticed that the command tag > row count is wrong if it does a cross-partition update: > > CREATE TABLE target (a int, b int) PARTITION BY LIST (b); > CREATE TABLE target_p1 PARTITION OF target FOR VALUES IN (1); >

Seek for helper documents to implement WAL with an FDW

2023-02-21 Thread Komal Habura
Hi all, I have written an FDW, which is similar to the file_fdw. I need the support of WAL to perform logical and stream replication. I have knowledge about custom WAL but do not have clarity about implementing WAL(writing, redo, desc, identify, etc..) and cases where WAL can be applied.

RE: DDL result is lost by CREATE DATABASE with WAL_LOG strategy

2023-02-21 Thread Ryo Matsumura (Fujitsu)
> On Thu, Feb 16, 2023 at 10:24:13AM +0530, Dilip Kumar wrote: > > Yes, there is no reason to pass this as false, seems like this is > > passed false by mistake. And your patch fixes the issue. On Thu, Feb 16, 2023 at 02:26:55PM +0900, Michael Paquier wrote: > So, if I am understanding this

Re: Some revises in adding sorting path

2023-02-21 Thread Richard Guo
On Tue, Feb 14, 2023 at 10:53 AM David Rowley wrote: > I looked at the three patches and have some thoughts: Thanks for reviewing! > 0001: > > Does the newly added test have to be this complex? I think it might > be better to just come up with the most simple test you can that uses > an

Re: Some revises in adding sorting path

2023-02-21 Thread Richard Guo
On Thu, Feb 16, 2023 at 7:50 PM Etsuro Fujita wrote: > I'm not sure this is a good idea, because the epq_path will return at > most one tuple in an EPQ recheck. > > The reason why an extra Sort node is injected into the epq_path is > only label it with the correct sort order to use it as an

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

2023-02-21 Thread Hayato Kuroda (Fujitsu)
Dear Amit, Thank you for commenting! > > 8. > > + > > + The delay is effective only when the initial table > > synchronization > > + has been finished and the publisher decides to send a particular > > + transaction downstream. The delay does not take into

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

2023-02-21 Thread Katsuragi Yuta
Hi Kuroda-san, Thank you for updating the patch! On 2023-02-20 15:42, Hayato Kuroda (Fujitsu) wrote: Dear Katsuragi-san, Thank you for reviewing! PSA new version. I rethought the pqSocketPoll part. Current interpretation of arguments seems a little bit confusing because a specific pattern