public inbox for [email protected]
help / color / mirror / Atom feed[PATCH 08/18] *an exclusive
3+ messages / 3 participants
[nested] [flat]
* [PATCH 08/18] *an exclusive
@ 2021-02-06 21:13 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 3+ messages in thread
From: Justin Pryzby @ 2021-02-06 21:13 UTC (permalink / raw)
3c84046490bed3c22e0873dc6ba492e02b8b9051
---
doc/src/sgml/ref/drop_index.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/ref/drop_index.sgml b/doc/src/sgml/ref/drop_index.sgml
index 85cf23bca2..b6d2c2014f 100644
--- a/doc/src/sgml/ref/drop_index.sgml
+++ b/doc/src/sgml/ref/drop_index.sgml
@@ -45,7 +45,7 @@ DROP INDEX [ CONCURRENTLY ] [ IF EXISTS ] <replaceable class="parameter">name</r
<para>
Drop the index without locking out concurrent selects, inserts, updates,
and deletes on the index's table. A normal <command>DROP INDEX</command>
- acquires exclusive lock on the table, blocking other accesses until the
+ acquires an exclusive lock on the table, blocking other accesses until the
index drop can be completed. With this option, the command instead
waits until conflicting transactions have completed.
</para>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="0009-Doc-review-for-psql-dX.patch"
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgbench with partitioned tables
@ 2025-01-31 22:23 Melanie Plageman <[email protected]>
2025-02-02 13:45 ` Re: pgbench with partitioned tables Álvaro Herrera <[email protected]>
0 siblings, 1 reply; 3+ messages in thread
From: Melanie Plageman @ 2025-01-31 22:23 UTC (permalink / raw)
To: Sergey Tatarintsev <[email protected]>; +Cc: [email protected] <[email protected]>
On Fri, Jan 31, 2025 at 6:32 AM Sergey Tatarintsev
<[email protected]> wrote:
>
> When using manually created partitioned tables for pgbench, an error
> occurred:
> ERROR: cannot perform COPY FREEZE on a partitioned table.
>
> Currently only pgbench_accounts can be partitioned, all others must be a
> regular tables.
>
> I wrote a patch to disable WITH (FREEZE = ON) when generating data for
> non-regular tables.
Thanks for the patch!
I recommend including a repro when proposing such things. Here's one I made
# pgbench init so all the tables are there
pgbench -i -s 10
# drop pgbench_tellers and recreate it partitioned
psql -f- <<EOF
DROP TABLE IF EXISTS pgbench_tellers;
CREATE TABLE pgbench_tellers (
tid INT NOT NULL,
bid INT,
tbalance INT,
filler CHAR(84)
) PARTITION BY RANGE (tid);
CREATE TABLE pgbench_tellers_p1
PARTITION OF pgbench_tellers
FOR VALUES FROM (1) TO (50);
CREATE TABLE pgbench_tellers_p2
PARTITION OF pgbench_tellers
FOR VALUES FROM (50) TO (2000);
EOF
# run pgbench init with only the data gen step
pgbench -i -I g -s 10
Personally, I have needed to disable COPY FREEZE during pgbench -i
when benchmarking features related to vacuum's freezing behavior.
Maybe instead of just not using COPY FREEZE on a table if it is
partitioned, we could add new data generation init_steps. Perhaps one
that is client-side data generation (g) but with no freezing? I'm not
really sure what the letter would be (f? making it f, g, and G?).
It seems they did not consider making COPY FREEZE optional when adding
the feature to pgbench [1].
This differs from your patch's behavior but it might still solve your problem?
- Melanie
[1] https://www.postgresql.org/message-id/flat/20210308.143907.2014279678657453983.t-ishii%40gmail.com
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgbench with partitioned tables
2025-01-31 22:23 Re: pgbench with partitioned tables Melanie Plageman <[email protected]>
@ 2025-02-02 13:45 ` Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 3+ messages in thread
From: Álvaro Herrera @ 2025-02-02 13:45 UTC (permalink / raw)
To: Melanie Plageman <[email protected]>; +Cc: Sergey Tatarintsev <[email protected]>; [email protected] <[email protected]>
On 2025-Jan-31, Melanie Plageman wrote:
> Maybe instead of just not using COPY FREEZE on a table if it is
> partitioned, we could add new data generation init_steps. Perhaps one
> that is client-side data generation (g) but with no freezing? I'm not
> really sure what the letter would be (f? making it f, g, and G?).
I think it makes sense to do what you suggest, but on the other hand,
the original code that Sergey is patching looks like a hack in the sense
that it hardcodes which tables to use FREEZE with. There's no point to
doing things that way actually, so accepting Sergey's patch to replace
that with a relkind check feels sensible to me.
I think the query should be
SELECT relkind FROM pg_catalog.pg_class WHERE oid='%s'::pg_catalog.regclass
if only for consistency with pgbench's other query on catalogs.
Your proposal to add different init_steps might be reasonable, at least
if we allowed partitionedness of tables to vary in other ways (eg. if we
made pgbench_history partitioned), but I don't think it conflicts with
Sergey's patch in spirit.
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"Here's a general engineering tip: if the non-fun part is too complex for you
to figure out, that might indicate the fun part is too ambitious." (John Naylor)
https://postgr.es/m/CAFBsxsG4OWHBbSDM%3DsSeXrQGOtkPiOEOuME4yD7Ce41NtaAD9g%40mail.gmail.com
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2025-02-02 13:45 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-02-06 21:13 [PATCH 08/18] *an exclusive Justin Pryzby <[email protected]>
2025-01-31 22:23 Re: pgbench with partitioned tables Melanie Plageman <[email protected]>
2025-02-02 13:45 ` Re: pgbench with partitioned tables Álvaro Herrera <[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