public inbox for [email protected]
help / color / mirror / Atom feed[PATCH 08/33] version 14 since 06ba4a63b85e5aa47b325c3235c16c05a0b58b96
4+ messages / 4 participants
[nested] [flat]
* [PATCH 08/33] version 14 since 06ba4a63b85e5aa47b325c3235c16c05a0b58b96
@ 2021-12-29 19:46 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 4+ messages in thread
From: Justin Pryzby @ 2021-12-29 19:46 UTC (permalink / raw)
---
doc/src/sgml/ref/pgbench.sgml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml
index c71dab644ca..be1896fa99d 100644
--- a/doc/src/sgml/ref/pgbench.sgml
+++ b/doc/src/sgml/ref/pgbench.sgml
@@ -220,8 +220,8 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
data is generated in <command>pgbench</command> client and then
sent to the server. This uses the client/server bandwidth
extensively through a <command>COPY</command>.
- <command>pgbench</command> uses the FREEZE option with 14 or later
- versions of <productname>PostgreSQL</productname> to speed up
+ <command>pgbench</command> uses the FREEZE option with version 14 or later
+ of <productname>PostgreSQL</productname> to speed up
subsequent <command>VACUUM</command>, unless partitions are enabled.
Using <literal>g</literal> causes logging to print one message
every 100,000 rows while generating data for the
--
2.17.1
--924gEkU1VlJlwnwX
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0009-typos-sysviews-since-adc8fc6167aa3f68b951ddd60ea32a6.patch"
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Restrict publishing of partitioned table with a foreign table as partition
@ 2025-04-07 04:13 Sergey Tatarintsev <[email protected]>
2025-04-07 12:30 ` Re: Restrict publishing of partitioned table with a foreign table as partition Álvaro Herrera <[email protected]>
2025-04-28 12:51 ` Re: Restrict publishing of partitioned table with a foreign table as partition Shlok Kyal <[email protected]>
0 siblings, 2 replies; 4+ messages in thread
From: Sergey Tatarintsev @ 2025-04-07 04:13 UTC (permalink / raw)
To: Álvaro Herrera <[email protected]>; Shlok Kyal <[email protected]>; +Cc: vignesh C <[email protected]>; [email protected]
07.04.2025 03:27, Álvaro Herrera пишет:
> On 2025-Apr-01, Shlok Kyal wrote:
>
>> I have modified the comment in create_publication.sgml and also added
>> comment in the restrictions section of logical-replication.sgml.
>> I have also added a more detailed explanation in comment of
>> 'check_foreign_tables'
>>
>> I have attached the updated v11 patch.
> Sadly I don't have time to describe the changes proposed here right now,
> but I'll do that early tomorrow. (Some minor changes are still needed,
> particularly the comments to publication_check_foreign_parts which are
> mostly unchanged from what your patch has. I'll do another review round
> tomorrow.)
>
Hello!
I looked at the latest patch again and found one more place for
list_free(). Also look at additional test case:
diff --git a/src/backend/catalog/pg_publication.c
b/src/backend/catalog/pg_publication.c index 51e463c112b..7fcc191feb9
100644 --- a/src/backend/catalog/pg_publication.c +++
b/src/backend/catalog/pg_publication.c @@ -442,6 +442,7 @@
GetPubPartitionOptionRelations(List *result, PublicationPartOpt
pub_partopt, result = lappend_oid(result,
partOid); } + list_free(all_parts);
} else result = lappend_oid(result,
relid); diff --git a/src/test/regress/sql/publication.sql
b/src/test/regress/sql/publication.sql index 49c9d98b668..e56aebc397a
100644 --- a/src/test/regress/sql/publication.sql +++
b/src/test/regress/sql/publication.sql @@ -1296,6 +1296,14 @@ SELECT
pubname, tablename FROM pg_publication_tables WHERE schemaname in
('sch3' -- foreign partition ALTER PUBLICATION pub1 SET
(publish_via_partition_root); +CREATE SCHEMA sch5; +CREATE SCHEMA sch6;
+CREATE TABLE sch6.tmain(id int) PARTITION BY RANGE(id); +CREATE TABLE
sch5.part1 PARTITION OF sch6.tmain FOR VALUES FROM (0) TO (10) PARTITION
BY RANGE(id); +CREATE FOREIGN TABLE sch6.part2 PARTITION OF sch5.part1
FOR VALUES FROM (0) TO (5) SERVER fdw_server; +CREATE PUBLICATION pub4
FOR TABLES IN SCHEMA sch5 WITH (publish_via_partition_root); +SELECT
pubname, tablename FROM pg_publication_tables WHERE pubname = 'pub4'
ORDER BY pubname, tablename; + DROP PUBLICATION pub1; DROP PUBLICATION
pub2; DROP PUBLICATION pub3;
I think this is a wrong assumption:
ScanKeyInit(&key[keycount++], Anum_pg_class_relispartition,
BTEqualStrategyNumber, F_BOOLEQ, BoolGetDatum(false));
In this case sch5.part1 is partitioned table, but it also partition of
table in different schema
--
With best regards,
Sergey Tatarintsev,
PostgresPro
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Restrict publishing of partitioned table with a foreign table as partition
2025-04-07 04:13 Re: Restrict publishing of partitioned table with a foreign table as partition Sergey Tatarintsev <[email protected]>
@ 2025-04-07 12:30 ` Álvaro Herrera <[email protected]>
1 sibling, 0 replies; 4+ messages in thread
From: Álvaro Herrera @ 2025-04-07 12:30 UTC (permalink / raw)
To: Sergey Tatarintsev <[email protected]>; +Cc: Shlok Kyal <[email protected]>; vignesh C <[email protected]>; [email protected]
On 2025-Apr-07, Sergey Tatarintsev wrote:
> I think this is a wrong assumption:
>
> ScanKeyInit(&key[keycount++], Anum_pg_class_relispartition,
> BTEqualStrategyNumber, F_BOOLEQ, BoolGetDatum(false));
>
> In this case sch5.part1 is partitioned table, but it also partition of table
> in different schema
Yeah, this looks ill-considered.
After looking at this code some more, I'm withdrawing myself from here.
(I don't mean just this patch in particular, I mean the logical
replication code as a whole.)
Thanks,
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"La persona que no quería pecar / estaba obligada a sentarse
en duras y empinadas sillas / desprovistas, por cierto
de blandos atenuantes" (Patricio Vogel)
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Restrict publishing of partitioned table with a foreign table as partition
2025-04-07 04:13 Re: Restrict publishing of partitioned table with a foreign table as partition Sergey Tatarintsev <[email protected]>
@ 2025-04-28 12:51 ` Shlok Kyal <[email protected]>
1 sibling, 0 replies; 4+ messages in thread
From: Shlok Kyal @ 2025-04-28 12:51 UTC (permalink / raw)
To: Sergey Tatarintsev <[email protected]>; +Cc: Álvaro Herrera <[email protected]>; vignesh C <[email protected]>; [email protected]
On Mon, 7 Apr 2025 at 09:43, Sergey Tatarintsev
<[email protected]> wrote:
>
> 07.04.2025 03:27, Álvaro Herrera пишет:
>
> On 2025-Apr-01, Shlok Kyal wrote:
>
> I have modified the comment in create_publication.sgml and also added
> comment in the restrictions section of logical-replication.sgml.
> I have also added a more detailed explanation in comment of
> 'check_foreign_tables'
>
> I have attached the updated v11 patch.
>
> Sadly I don't have time to describe the changes proposed here right now,
> but I'll do that early tomorrow. (Some minor changes are still needed,
> particularly the comments to publication_check_foreign_parts which are
> mostly unchanged from what your patch has. I'll do another review round
> tomorrow.)
>
> Hello!
>
> I looked at the latest patch again and found one more place for list_free(). Also look at additional test case:
>
> diff --git a/src/backend/catalog/pg_publication.c b/src/backend/catalog/pg_publication.c index 51e463c112b..7fcc191feb9 100644 --- a/src/backend/catalog/pg_publication.c +++ b/src/backend/catalog/pg_publication.c @@ -442,6 +442,7 @@ GetPubPartitionOptionRelations(List *result, PublicationPartOpt pub_partopt, result = lappend_oid(result, partOid); } + list_free(all_parts); } else result = lappend_oid(result, relid); diff --git a/src/test/regress/sql/publication.sql b/src/test/regress/sql/publication.sql index 49c9d98b668..e56aebc397a 100644 --- a/src/test/regress/sql/publication.sql +++ b/src/test/regress/sql/publication.sql @@ -1296,6 +1296,14 @@ SELECT pubname, tablename FROM pg_publication_tables WHERE schemaname in ('sch3' -- foreign partition ALTER PUBLICATION pub1 SET (publish_via_partition_root); +CREATE SCHEMA sch5; +CREATE SCHEMA sch6; +CREATE TABLE sch6.tmain(id int) PARTITION BY RANGE(id); +CREATE TABLE sch5.part1 PARTITION OF sch6.tmain FOR VALUES FROM (0) TO (10) PARTITION BY RANGE(id); +CREATE FOREIGN TABLE sch6.part2 PARTITION OF sch5.part1 FOR VALUES FROM (0) TO (5) SERVER fdw_server; +CREATE PUBLICATION pub4 FOR TABLES IN SCHEMA sch5 WITH (publish_via_partition_root); +SELECT pubname, tablename FROM pg_publication_tables WHERE pubname = 'pub4' ORDER BY pubname, tablename; + DROP PUBLICATION pub1; DROP PUBLICATION pub2; DROP PUBLICATION pub3;
>
> I think this is a wrong assumption:
>
> ScanKeyInit(&key[keycount++], Anum_pg_class_relispartition, BTEqualStrategyNumber, F_BOOLEQ, BoolGetDatum(false));
>
> In this case sch5.part1 is partitioned table, but it also partition of table in different schema
>
Hi Sergey,
Thanks for reviewing the patch. I have addressed the comment in the
latest patch shared in [1].
[1]: https://www.postgresql.org/message-id/CANhcyEW0QMiJXMqpPFRHni-q0Rm4R0hpZ0LdaqA%3DF3wvDUU6sQ%40mail.g...
Thanks and Regards,
Shlok Kyal
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2025-04-28 12:51 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-12-29 19:46 [PATCH 08/33] version 14 since 06ba4a63b85e5aa47b325c3235c16c05a0b58b96 Justin Pryzby <[email protected]>
2025-04-07 04:13 Re: Restrict publishing of partitioned table with a foreign table as partition Sergey Tatarintsev <[email protected]>
2025-04-07 12:30 ` Re: Restrict publishing of partitioned table with a foreign table as partition Álvaro Herrera <[email protected]>
2025-04-28 12:51 ` Re: Restrict publishing of partitioned table with a foreign table as partition Shlok Kyal <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox