Re: is_superuser is not documented

2022-09-09 Thread Euler Taveira
tgres=# \dfS is_superuser List of functions Schema | Name | Result data type | Argument data types | Type +--+--+-+-- (0 rows) postgres=# SHOW is_superuser; is_superuser -- on (1 row) Do you mind writing a patch

Re: including pid's for `There are XX other sessions using the database`

2022-08-19 Thread Euler Taveira
executing DROP DATABASE. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: fix typos

2022-08-12 Thread Euler Taveira
e could also change the messages to say "ID"? ... or say could not drop replication origin %u, in use by PID %d AFAICS there is no "with ID" but there is "with identifier". I personally prefer to omit these additional words; it seems clear wi

Re: Allow logical replication to copy tables in binary format

2022-08-11 Thread Euler Taveira
lts to false, someone can decide to use it for performance reasons). I did a quick test and the failure while using binary mode is not clear. Since you are modifying this code, you could probably provide additional patch(es) to make it clear that there is an error (due to some documented restr

Re: Allow logical replication to copy tables in binary format

2022-08-11 Thread Euler Taveira
On Thu, Aug 11, 2022, at 8:04 AM, Amit Kapila wrote: > On Thu, Aug 11, 2022 at 7:34 AM Euler Taveira wrote: > > > > The reason to use text format is that it is error prone. There are > > restrictions > > while using the binary format. For example, if your schema has di

Re: Allow logical replication to copy tables in binary format

2022-08-10 Thread Euler Taveira
ry mode) for a publisher using 14 or 15 and a subscriber using 16. IMO you should only allow it for publisher on 16 or later. * Docs should say that the binary option also applies to initial table synchronization and possibly emphasize some of the restrictions. * Tests. Are the current tests

Re: logical replication restrictions

2022-08-10 Thread Euler Taveira
lection, let's use ms as default unit if the user doesn't specify one. I fixed all the other suggestions too. -- Euler Taveira EDB https://www.enterprisedb.com/ From a28987c8adb70d6932558f5e39f9dd4c55223a30 Mon Sep 17 00:00:00 2001 From: Euler Taveira Date: Sat, 6 Nov 2021 11:31:10 -0300 Subje

Re: logical replication restrictions

2022-08-08 Thread Euler Taveira
se; tablesync workers are not closed as soon as the COPY finishes (which means possibly running out of workers sooner). After all tablesync workers have reached READY state, the apply delay is activated. The documentation was correct; the code wasn't. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: logical replication restrictions

2022-08-08 Thread Euler Taveira
pose the delay as soon as the COPY finishes because it will take a long time to finish due to possibly lack of workers. Instead, let's wait for the READY state for all tables then apply the delay. I added an explanation for it. I also modified the test a bit to use the new function wait_for_subscription_s

Re: logical replication restrictions

2022-08-01 Thread Euler Taveira
hat's a good point. Logical replication is per database and it is slightly different from physical replication that is per cluster. In physical replication, you have no choice but to have a GUC. It is very unlikely that someone wants to delay all logical replicas. Therefore, the benefit of having a GUC

Re: logical replication restrictions

2022-08-01 Thread Euler Taveira
sure. It should be documented in the catalogs. It is an important information for user-visible interface. There are a few places in the documentation that the unit is mentioned. > There are some test cases for CREATE SUBSCRIPTION but there are no > test cases for ALTER SUBSCRIPTION changi

Re: Introduce "log_connection_stages" setting.

2022-07-14 Thread Euler Taveira
in the commit message that this commit is introducing an incompatibility. Hence, when it is time to write the release notes, the information about the removal and the new replacement will be added. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Introduce "log_connection_stages" setting.

2022-07-12 Thread Euler Taveira
ould suggest log_connection_messages or log_connection (with the 's' in the end -- since it is too similar to the current GUC name, I'm afraid it is not a good name for it). -- Euler Taveira EDB https://www.enterprisedb.com/

Re: logical replication restrictions

2022-07-04 Thread Euler Taveira
On Wed, Mar 23, 2022, at 6:19 PM, Euler Taveira wrote: > On Mon, Mar 21, 2022, at 10:09 PM, Euler Taveira wrote: >> On Mon, Mar 21, 2022, at 10:04 PM, Andres Freund wrote: >>> On 2022-03-20 21:40:40 -0300, Euler Taveira wrote: >>> > On Mon, Feb 28, 2022, a

Re: Re-order "disable_on_error" in tab-complete COMPLETE_WITH

2022-07-04 Thread Euler Taveira
What do you or others think? No objection. It is a good thing for future backpatches. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Error from the foreign RDBMS on a foreign table I have no privilege on

2022-06-07 Thread Euler Taveira
ple) -- probably not at that point. It is behaving accordingly. However, that error is exposing an implementation detail (FDW has to access the remote table at that phase). I don't think that changing the current design (permission check after planning) for FDWs to provide a good UX is worth it. I

Re: tablesync copy ignores publication actions

2022-06-07 Thread Euler Taveira
ple. It is an easy-to-understand concept and a good description is better than ~ 80 new lines. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Ignore heap rewrites for materialized views in logical replication

2022-05-31 Thread Euler Taveira
now what you think? Your modification will hang until the test timeout without the patch. That's why I avoided to use wait_for_caught_up and used a loop for fast exit on success or failure. I'm fine with a simple test case like you proposed. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Ignore heap rewrites for materialized views in logical replication

2022-05-30 Thread Euler Taveira
d along with a fix. If we are not able to find any reasonable > way then we can think of skipping it. The new test is attached. -- Euler Taveira EDB https://www.enterprisedb.com/ From fe13dc44f210b5f14b97bf9a29a242c2211ba700 Mon Sep 17 00:00:00 2001 From: Euler Taveira Date: Fri, 27 May 2022 1

Ignore heap rewrites for materialized views in logical replication

2022-05-27 Thread Euler Taveira
is crucial here. -- Euler Taveira EDB https://www.enterprisedb.com/ From 652efe45665d91f2f4ae865dba078fcaffdc0a17 Mon Sep 17 00:00:00 2001 From: Euler Taveira Date: Fri, 27 May 2022 11:35:27 -0300 Subject: [PATCH v1 1/2] Ignore heap rewrites for materialized views in logical replication I

Re: Privileges on PUBLICATION

2022-05-18 Thread Euler Taveira
lication > Security". [1] https://postgr.es/m/d96103fe-99e2-4119-bd76-952d326b7...@www.fastmail.com -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Privileges on PUBLICATION

2022-05-18 Thread Euler Taveira
On Wed, May 18, 2022, at 6:16 AM, Antonin Houska wrote: > The patch is attached to this message. Great. Add it to the next CF. I'll review it when I have some spare time. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Privileges on PUBLICATION

2022-05-13 Thread Euler Taveira
future version of PostgreSQL. I also wouldn't use the warning tag because it fits in the same category as the other restrictions listed in the page. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: First draft of the PG 15 release notes

2022-05-12 Thread Euler Taveira
On Thu, May 12, 2022, at 11:22 AM, Bruce Momjian wrote: > On Thu, May 12, 2022 at 11:12:54AM -0300, Euler Taveira wrote: > OB> On Thu, May 12, 2022, at 11:03 AM, Bruce Momjian wrote: > > > > I looked at that but thought that everyone would already assume we > &

Re: First draft of the PG 15 release notes

2022-05-12 Thread Euler Taveira
mentioned or not. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Privileges on PUBLICATION

2022-05-12 Thread Euler Taveira
publications. If you have multiple publications in a database, a subscription can use all publications available. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Privileges on PUBLICATION

2022-05-09 Thread Euler Taveira
d that will have the same effect as REPLICATION property [1] has right now, I would say it won't. Are you aiming a fine-grained access control on publisher? [1] https://www.postgresql.org/docs/devel/logical-replication-security.html -- Euler Taveira EDB https://www.enterprisedb.com/

Re: 2022-05-12 release announcement draft

2022-05-09 Thread Euler Taveira
talled. pageinspect (possibly with the URL) is clear enough. However, if you don't like the shorthand, 'pageinspect extension' or 'pageinspect module' are good options. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: 2022-05-12 release announcement draft

2022-05-09 Thread Euler Taveira
[1] https://www.postgresql.org/about/news/postgresql-142-136-1210-1115-and-1020-released-2402/ -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Logical replication timeout problem

2022-05-09 Thread Euler Taveira
>end_xact; Do you really need a new variable here? It has the same name and the new one isn't changed during the execution. Does this issue deserve a test? A small wal_receiver_timeout. Although, I'm not sure how stable the test will be. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Configuration Parameter/GUC value validation hook

2022-05-06 Thread Euler Taveira
to ALTER USER SET and ALTER DATABASE SET. The current user can set parameter for himself and he could adjust the limits. Besides that the purpose of these SQL commands are to apply initial settings for a combination of user/database. I'm afraid it is out of scope to check after the session is es

trivial comment fix

2022-04-27 Thread Euler Taveira
Hi, While reading worker.c, I noticed that the referred SQL command was wrong. ALTER SUBSCRIPTION ... REFRESH PUBLICATION instead of ALTER TABLE ... REFRESH PUBLICATION. Trivial fix attached. -- Euler Taveira EDB https://www.enterprisedb.com/ diff --git a/src/backend/replication/logical

Re: Inconsistent "ICU Locale" output on older server versions

2022-04-15 Thread Euler Taveira
" d.datcollate as \"%s\",\n" <--- there > + " 'libc' AS \"%s\",\n", > + gettext_noop("ICU Locale"), > + gettext_noop("Locale Provider")); > > I'd th

Re: Skipping schema changes in publication

2022-04-14 Thread Euler Taveira
mmand above suggests that it skips all tables in a certain schema. What happen if I decide to include a particular table of the skipped schema (second command)? ALTER PUBLICATION pub1 ADD SKIP ALL TABLES IN SCHEMA s1,s2; ALTER PUBLICATION pub1 ADD TABLE s1.foo; Having said that I'm not wedded to this

Re: Support logical replication of DDLs

2022-04-14 Thread Euler Taveira
e treated accordingly such as a TABLESPACE specification or a custom data type. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Logical replication timeout problem

2022-04-14 Thread Euler Taveira
criber. Does this same issue occur for long transactions? I mean keep a long transaction open and execute thousands of transactions. BEGIN; INSERT INTO foo (a) VALUES(1); -- wait a few hours while executing 10^x transactions INSERT INTO foo (a) VALUES(2); COMMIT; -- Euler Taveira EDB https://www.enterprisedb.com/

Re: PG DOCS - logical replication filtering

2022-04-13 Thread Euler Taveira
On Wed, Apr 13, 2022, at 12:24 AM, Peter Smith wrote: > PSA patch v10 which addresses the remaining review comments from Euler [1] Looks good to me. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: PG DOCS - logical replication filtering

2022-04-12 Thread Euler Taveira
it. I noticed that the website CSS includes it. However, the PDF will not include the border. I would add a separate description for the subscriber just to be clear. One last suggestion, you are using identifiers in uppercase letters but "primary key" is in lowercase. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: PG DOCS - logical replication filtering

2022-04-11 Thread Euler Taveira
ink reusing the same tables and publication introduces complexity. Shouldn't we just use different tables and publication to provide an "easy" example? It would avoid DROP PUBLICATION, ALTER SUBSCRIPTION and TRUNCATE. > Do the inserts same as before. We should indicate the node (publisher) to be clear. [1] https://www.postgresql.org/docs/devel/sql-createpublication.html -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Support logical replication of DDLs

2022-04-11 Thread Euler Taveira
ands. I mean the main point of this feature is to have an API to create an object that the logical replication can use it for initial schema synchronization. This "DDL to create an object" was already discussed in the past [2]. [1] https://github.com/2ndQuadrant/pglogical/blob/REL2_x_S

merge documentation fix

2022-04-01 Thread Euler Taveira
a WHEN MATCHED THEN DELETE; -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Logical replication timeout problem

2022-03-31 Thread Euler Taveira
to set ctx->progress with the callback variables (for example, PGOUTPUT_PROGRESS_CHANGE for change_cb()) that we would like to run NewUpdateProgress. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Logical replication timeout problem

2022-03-31 Thread Euler Taveira
n't impose a burden on maintainability. [1] https://www.postgresql.org/message-id/20200309183018.tzkzwu635sd366ej%40alap3.anarazel.de -- Euler Taveira EDB https://www.enterprisedb.com/

Re: logical replication restrictions

2022-03-23 Thread Euler Taveira
On Mon, Mar 21, 2022, at 10:09 PM, Euler Taveira wrote: > On Mon, Mar 21, 2022, at 10:04 PM, Andres Freund wrote: >> On 2022-03-20 21:40:40 -0300, Euler Taveira wrote: >> > On Mon, Feb 28, 2022, at 9:18 PM, Euler Taveira wrote: >> > > Long time, no patch. Here it is

Re: logical replication restrictions

2022-03-21 Thread Euler Taveira
On Mon, Mar 21, 2022, at 10:04 PM, Andres Freund wrote: > On 2022-03-20 21:40:40 -0300, Euler Taveira wrote: > > On Mon, Feb 28, 2022, at 9:18 PM, Euler Taveira wrote: > > > Long time, no patch. Here it is. I will provide documentation in the next > > > version. I wou

Re: Skipping logical replication transactions on subscriber side

2022-03-21 Thread Euler Taveira
0_skip_option.pl. > > > > As explained in my previous email, I don't think any change is > required for this comment but do let me know if you still think so? Oh, sorry about the noise. I saw mixed tests between the 2 new features and I was confused if it was intentional or not. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Skipping logical replication transactions on subscriber side

2022-03-20 Thread Euler Taveira
isable_on_error.pl | 94 -- src/test/subscription/t/029_on_error.pl | 183 +++ It seems you are removing a test for 705e20f8550c0e8e47c0b6b20b5f5ffd6ffd9e33. I should also name 029_on_error.pl to something else such as 030_skip_lsn.pl or a generic name 030_skip_option.pl. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: logical replication restrictions

2022-03-20 Thread Euler Taveira
On Mon, Feb 28, 2022, at 9:18 PM, Euler Taveira wrote: > Long time, no patch. Here it is. I will provide documentation in the next > version. I would appreciate some feedback. This patch is broken since commit 705e20f8550c0e8e47c0b6b20b5f5ffd6ffd9e33. I rebased it. I added documen

Re: PG DOCS - logical replication filtering

2022-03-10 Thread Euler Taveira
umber of rows in the example but I didn't bother to remove them. It seems we can remove some sentences from the CREATE PUBLICATION because we have a new section that explains all of it. I think the link that was added by this patch is sufficient. -- Euler Taveira EDB https://www.enterprisedb.com

Re: Add the replication origin name and commit-LSN to logical replication worker errcontext

2022-03-04 Thread Euler Taveira
name (i.e., > pg_16395) and the next LSN of the commit LSN (i.e., > LSN 0/14C0379). You could also add: After that the replication can be resumed by ALTER SUBSCRIPTION ... ENABLE. Let's provide complete instructions. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: row filtering for logical replication

2022-03-03 Thread Euler Taveira
On Thu, Mar 3, 2022, at 7:47 AM, Amit Kapila wrote: > LGTM. I'll push this tomorrow unless Tomas or Euler feels otherwise. Sounds good to me. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: row filtering for logical replication

2022-03-02 Thread Euler Taveira
5 SET TABLE testpub_rf_tbl3 WHERE (e > 300 AND e < 500); 159 \dRp+ testpub5 IIRC this test was written before adding the row filter information into the psql. We could add \d+ testpub_rf_tbl3 before and after the modification. > 2) There are no pg_dump tests. WFM. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: logical replication restrictions

2022-03-01 Thread Euler Taveira
On Tue, Mar 1, 2022, at 3:27 AM, osumi.takami...@fujitsu.com wrote: > $ git am v1-0001-Time-delayed-logical-replication-subscriber.patch I generally use -3 to fall back on 3-way merge. Doesn't it work for you? -- Euler Taveira EDB https://www.enterprisedb.com/

Re: logical replication restrictions

2022-02-28 Thread Euler Taveira
On Wed, Sep 22, 2021, at 1:57 PM, Euler Taveira wrote: > On Wed, Sep 22, 2021, at 1:18 AM, Amit Kapila wrote: >> On Tue, Sep 21, 2021 at 4:21 PM Marcos Pegoraro wrote: >>> No, I´m talking about that configuration you can have on standby servers >>> recovery_min_apply_

Re: Commitfest manager for 2022-03

2022-02-27 Thread Euler Taveira
On Sat, Feb 26, 2022, at 9:37 PM, Justin Pryzby wrote: > |https://commitfest.postgresql.org/37/2906/ > |Row filtering for logical replication > If I'm not wrong, this is merged and should be closed? I think Amit forgot to mark it as committed. Done. -- Euler Taveira ED

Re: Design of pg_stat_subscription_workers vs pgstats

2022-02-25 Thread Euler Taveira
dn't find it. https://postgr.es/m/20180629.173418.190173462.horiguchi.kyot...@lab.ntt.co.jp -- Euler Taveira EDB https://www.enterprisedb.com/

Re: logical decoding and replication of sequences

2022-02-23 Thread Euler Taveira
On Wed, Feb 23, 2022, at 4:18 PM, Tomas Vondra wrote: > On 2/23/22 18:33, Euler Taveira wrote: > > On Wed, Feb 23, 2022, at 1:07 PM, Tomas Vondra wrote: > >> Maybe, but I don't think it's very common to have that many > >> schemas added to the same publication. And it

Re: logical decoding and replication of sequences

2022-02-23 Thread Euler Taveira
lkinds, but maybe DDL? Materialized view? As you mentioned DDL, maybe we can use the CREATE PUBLICATION syntax to select which DDL commands we want to replicate. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Frontend error logging style

2022-02-23 Thread Euler Taveira
s while I was working on pg_subscriber [1]. Your proposal looks good to me. [1] https://postgr.es/m/5ac50071-f2ed-4ace-a8fd-b892cffd33eb%40www.fastmail.com -- Euler Taveira EDB https://www.enterprisedb.com/

Re: List of all* PostgreSQL EXTENSIONs in the world

2022-02-23 Thread Euler Taveira
you say it, maybe the ^PGXS regex should be case-insensitive, > if pgxs can be written in e.g. lower case? Makefile variable names are case-sensitive. You cannot write pgxs or PgXs; it should be PGXS. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: speed up a logical replica setup

2022-02-21 Thread Euler Taveira
mmand via replication protocol. The disadvantages are: (a) it could duplicate code and (b) it might require maintenance if new options are added to the BASE_BACKUP command. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: row filtering for logical replication

2022-02-21 Thread Euler Taveira
discussed for 4 years [1]. [1] https://www.postgresql.org/message-id/CAHE3wggb715X%2BmK_DitLXF25B%3DjE6xyNCH4YOwM860JR7HarGQ%40mail.gmail.com -- Euler Taveira EDB https://www.enterprisedb.com/

speed up a logical replica setup

2022-02-21 Thread Euler Taveira
and pg_createsubscriber are names that I thought but I'm not excited about it. DOCUMENTATION It is available and describes this tool. TESTS Basic tests are included. It requires some tests to exercise this tool. Comments? [1] https://github.com/2ndQuadrant/pglogical -- Euler Taveira EDB https

Re: [PATCH] Add support to table_to_xmlschema regex when timestamp has time zone

2022-02-18 Thread Euler Taveira
ted/xmlmap_1.out that the output from this test when you build without libxml support. Run 'make check' to test your fix after building with/without libxml support. Regarding this fix, it looks good to me. FWIW, character class escape is defined here [1]. [1] https://www.w3.org/TR/xmlschema11-2/#cce

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

2022-02-09 Thread Euler Taveira
associate the subscription from the slot. Again, dropping a subscription that is associated with a replication slot requires a connection to remove the replication slot. If the publisher is gone (and so the replication slot), follow the HINT advice. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: [BUG]Update Toast data failure in logical replication

2022-02-08 Thread Euler Taveira
a non-critical path. In general, the condition will be executed once or twice. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: [BUG]Update Toast data failure in logical replication

2022-01-24 Thread Euler Taveira
, bool key_changed, bool key_has_external, bool *copy); -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Logging replication state changes

2022-01-08 Thread Euler Taveira
to change the message level but to implement a per-module log_min_messages. This idea is in the TODO [1] for more than a decade. Check the archives. I agree with Tom that the referred messages are noisy, hence, DEBUG1 is fine for it. [1] https://wiki.postgresql.org/wiki/Todo -- Euler Taveira ED

Re: row filtering for logical replication

2022-01-07 Thread Euler Taveira
PubWhereClauses->transformWhereClause->coerce_to_boolean > before storing where clause expression. It is not clear to me why that > is required? We might want to add a comment if that is required. It is redundant. It seems an additional safeguard that we should be removed. Good catch. -

Re: row filtering for logical replication

2022-01-07 Thread Euler Taveira
On Fri, Jan 7, 2022, at 3:35 AM, Amit Kapila wrote: > On Fri, Jan 7, 2022 at 9:44 AM Amit Kapila wrote: > > > > On Thu, Jan 6, 2022 at 6:42 PM Euler Taveira wrote: > > > > > > IMO we shouldn't reuse ReorderBufferChangeType. For a long-term sol

Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file

2022-01-06 Thread Euler Taveira
You can use IPC::Run to start psql in background. See examples in src/test/recovery. -- Euler Taveira EDB https://www.enterprisedb.com/

fix libpq comment

2022-01-06 Thread Euler Taveira
Hi, While checking the PQping code I noticed that pg_ctl does not rely on PQping since commit f13ea95f9e4 (v10) so the attached patch removes a comment from internal_ping(). -- Euler Taveira EDB https://www.enterprisedb.com/ From 3055de48fe71f47df357114c7a42db05edcdb290 Mon Sep 17 00:00:00

Re: row filtering for logical replication

2022-01-06 Thread Euler Taveira
ANGE_UPDATE and REORDER_BUFFER_CHANGE_DELETE are the first 3 values from the enum, otherwise, it breaks rfnodes and no_filters in pgoutput_row_filter(). I suggest a separate enum that contains only these 3 values. enum RowFilterPublishAction { PUBLISH_ACTION_INSERT, PUBLISH_ACTION_UPDATE, PUBLISH_ACTION_DELETE }; -- Euler Taveira EDB https://www.enterprisedb.com/

Re: row filtering for logical replication

2021-12-26 Thread Euler Taveira
On Sun, Dec 26, 2021, at 1:09 PM, Alvaro Herrera wrote: > On 2021-Dec-26, Euler Taveira wrote: > > > On Sat, Dec 25, 2021, at 1:20 AM, Amit Kapila wrote: > > > On Fri, Dec 24, 2021 at 11:04 AM Peter Smith > > > wrote: > > > > > > > > So, I

Re: row filtering for logical replication

2021-12-26 Thread Euler Taveira
ed results, any > > possible > > + null values should be accounted for. > > > > Your suggested wording sounds reasonable to me. Euler, others, any thoughts? +1. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Delay the variable initialization in get_rel_sync_entry

2021-12-23 Thread Euler Taveira
hed table in which case the cost is noticeable. > > --12.83%--pgoutput_change > |--11.84%--get_rel_sync_entry > |--4.76%--get_rel_relispartition > |--4.70%--get_rel_relkind Good catch. WFM. Deferring variable initialization close to its first use is good practice. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: correct the sizes of values and nulls arrays in pg_control_checkpoint

2021-12-23 Thread Euler Taveira
be useful for such case. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: pg_archivecleanup - add the ability to detect, archive and delete the unneeded wal files on the primary

2021-12-23 Thread Euler Taveira
IMO this issue wouldn't occur if you have a monitoring system and alerts and someone to keep an eye on it. If the disk full situation was caused by a failed archive command or a disconnected standby, it is easy to figure out; the fix is simple. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: relcache not invalidated when ADD PRIMARY KEY USING INDEX

2021-12-20 Thread Euler Taveira
. It seems you can simplify your checking indexForm->indisprimary directly, no? Why did you add new tests for test_decoding? I think the TAP tests alone are fine. BTW, this test is similar to publisher3/subscriber3. Isn't it better to use the same pub/sub to reduce the test execution time? --

Re: Confused comment about drop replica identity index

2021-12-20 Thread Euler Taveira
t; on, either. So I'd like to apply and back-patch the attached, as a > first step, to fix the inconsistency. > What do you think about the attached patch? It forbids the DROP INDEX. We might add a detail message but I didn't in this patch. -- Euler Taveira EDB https://www.enterprisedb.com/ Fro

Re: Confused comment about drop replica identity index

2021-12-16 Thread Euler Taveira
provide a test for indisreplident there. If this restriction is undesirable, we should at least document this choice and probably emit a WARNING for DROP INDEX. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: row filtering for logical replication

2021-12-06 Thread Euler Taveira
without > which the main patch is incomplete and buggy w.r.t replica identity. IMO we should merge sub-features as soon as we reach consensus. Every new sub-feature breaks comments, tests and documentation if you want to remove or rearrange patches. It seems I misread 0005. I agree that it is im

Re: row filtering for logical replication

2021-12-06 Thread Euler Taveira
On Mon, Dec 6, 2021, at 3:35 AM, Dilip Kumar wrote: > On Mon, Dec 6, 2021 at 6:49 AM Euler Taveira wrote: > > > > On Fri, Dec 3, 2021, at 8:12 PM, Euler Taveira wrote: > > > > PS> I will update the commit message in the next version. I barely changed > &

Re: row filtering for logical replication

2021-12-02 Thread Euler Taveira
State caches keyed and > separated by the 4x different pubactions. row filter is not applied for TRUNCATEs so it is just 3 operations. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: O(n) tasks cause lengthy startups and checkpoints

2021-12-01 Thread Euler Taveira
), (2) and (4), we could probably have an option to create some ephemeral logical decoding files into ramdisk (similar to statistics directory). I wouldn't like to hijack this thread but this proposal could alleviate the possible issues that you pointed out. If people are interested in this proposal, I can start a new thread about it. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: row filtering for logical replication

2021-11-30 Thread Euler Taveira
ilable in the subscriber (INSERT-only case), it makes sense to send all rows that satisfies any row filter. The current code already works this way. All row filter are combined into a WHERE clause using OR. If any of the publications don't have a row filter, there is no WHERE clause. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: row filtering for logical replication

2021-11-29 Thread Euler Taveira
ortunately we cannot use the relentry->pubactions because it aggregates this information if you have multiple entries. It seems a separate array should store this information that will be used later while evaluating the row filter -- around pgoutput_row_filter_exec_expr() call. -

Re: row filtering for logical replication

2021-11-25 Thread Euler Taveira
ly publish "insert" , publication B publish "update". When UPDATE, both row > filter in A and B will be executed. Is this behavior expected? Good question. No. The code should check the action before combining the multiple row filters. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Should we improve "PID XXXX is not a PostgreSQL server process" warning for pg_terminate_backend(<>)?

2021-11-17 Thread Euler Taveira
eSQL server process with PID %d is not allowed", I would say "signal PostgreSQL auxiliary process PID 1234 is not allowed". + ereport(WARNING, + (errmsg("PID %d is not a PostgreSQL server process", pid))); I would say "PID 1234 is not a PostgreSQL backend process"

Re: Allow users to choose what happens when recovery target is not reached

2021-11-13 Thread Euler Taveira
no option but start from scratch. [1] https://postgr.es/m/234a0c50-1160-86c2-4e4b-35e9684f1799%402ndquadrant.com [2] https://postgr.es/m/CAOBaU_ZDkyoQvEsYT0-p1Hb0m_nGtQJ4tTGm2-Ay6v%3DTCjmsWg%40mail.gmail.com -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Logical Replication - improve error message while adding tables to the publication in check_publication_add_relation

2021-11-13 Thread Euler Taveira
On Sat, Nov 13, 2021, at 12:00 AM, Bharath Rupireddy wrote: > On Sat, Nov 13, 2021 at 12:06 AM Euler Taveira wrote: > > > Here's a rebased v8 patch. Please review it. > > > > This improves the user experience by increasing the granularity of error > > reporting, an

Re: [BUG]Invalidate relcache when setting REPLICA IDENTITY

2021-11-12 Thread Euler Taveira
he case I wonder why not simply register > > invalidation without any check in the for loop as was the case with > > Tang's original patch? > > OK, I also think the code in Tang's original patch is fine. > Attach the patch which register invalidation without any check in the for > loop. WFM. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Logical Replication - improve error message while adding tables to the publication in check_publication_add_relation

2021-11-12 Thread Euler Taveira
a 2nd parameter and move those messages to it? I experiment this idea with the attached patch. The idea is to provide a unique function that reports accurate detail messages. -- Euler Taveira EDB https://www.enterprisedb.com/ From f068d4688a95c8e8c5a98d8d6f1847ddfafda43c Mon Sep 17 00:00:00 2001

Re: [BUG]Invalidate relcache when setting REPLICA IDENTITY

2021-11-11 Thread Euler Taveira
nclude a DELETE command, wait the initial table sync to avoid failing a subsequent test and improve some comments. -- Euler Taveira EDB https://www.enterprisedb.com/ From e81e0bb6c6796e7fd692b7d6643db8fb6770d9a1 Mon Sep 17 00:00:00 2001 From: "houzj.fnst" Date: Thu, 11 Nov 2021 18:21:

Re: add recovery, backup, archive, streaming etc. activity messages to server logs along with ps display

2021-11-11 Thread Euler Taveira
n your own script/program. I like Alvaro's idea of implementing a ring buffer for this kind of activity. This implementation could be applied to checkpoints, archiving, recovery, replication, base backup, WAL usage, connections and others. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: add recovery, backup, archive, streaming etc. activity messages to server logs along with ps display

2021-11-10 Thread Euler Taveira
nal DEBUG messages if there isn't a similar one yet. If at least the message level were module-controlled, you could modify a setting to gather more messages from a specific module. Unfortunately, that's not possible so we should avoid superfluous messages. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: emit recovery stats via a new file or a new hook

2021-11-10 Thread Euler Taveira
It seems more effort than it's worth. +1 for storing this data into the stats system. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: how to distinguish between using the server as a standby or for executing a targeted recovery in PG 11?

2021-09-27 Thread Euler Taveira
rting Postgres. In this case, you have to use a debugger such as gdb /path/to/postgres -p $(pgrep -f 'postgres: startup recovering') -quiet -batch -ex 'p StandbyMode' -ex 'quit' Unfortunately, there is no simple way such as checking if a .signal file exists. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: two_phase commit parameter used in subscription for a publication which is on < 15.

2021-09-27 Thread Euler Taveira
parameters and the output plugin would be responsible to report an error. I think the author decided to not do it because it is not an user-friendly approach. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: row filtering for logical replication

2021-09-27 Thread Euler Taveira
ent approach? I think it is an oversight from my side. It used to work the way you mentioned but I changed it. I'll include this change in the next patch. -- Euler Taveira EDB https://www.enterprisedb.com/

<    1   2   3   4   >