Re: Presentation tools used ?

2023-10-23 Thread Chris Travers
On Mon, Oct 23, 2023 at 8:30 AM Steve Litt wrote: > Achilleas Mantzios said on Sun, 22 Oct 2023 08:50:10 +0300 > > >Hello All > > > >I am going to give a talk about PostgerSQL, so I'd like to ask you > >people what do you use for your presentations, also I have no idea how > >the remote control w

Re: Presentation tools used ?

2023-10-23 Thread Greg Stark
On Mon, 23 Oct 2023 at 03:34, Chris Travers wrote: > > > > On Mon, Oct 23, 2023 at 8:30 AM Steve Litt wrote: >> >> Achilleas Mantzios said on Sun, 22 Oct 2023 08:50:10 +0300 >> >> >Hello All >> > >> >I am going to give a talk about PostgerSQL, so I'd like to ask you >> >people what do you use for

Re: Presentation tools used ?

2023-10-23 Thread Achilleas Mantzios - cloud
Thank you All people!

PostgreSQL inheritance vs https://wiki.postgresql.org/wiki/Don%27t_Do_This

2023-10-23 Thread Achilleas Mantzios - cloud
Hello All in the wiki above and specifically in this commit : https://wiki.postgresql.org/index.php?title=Don%27t_Do_This&type=revision&diff=33210&oldid=33082 someone added this section about inheritance : " Don't use table inheritance Don't use table inheritance

Re: PostgreSQL inheritance vs https://wiki.postgresql.org/wiki/Don%27t_Do_This

2023-10-23 Thread Alvaro Herrera
On 2023-Oct-23, Achilleas Mantzios - cloud wrote: > I believe this text is false on too many accounts. So, what's the consensus > about Inheritance in PostgreSQL, I am going to give a talk on it in November > and I wouldn't like to advertise/promote/teach something that the community > has decided

Re: PostgreSQL inheritance vs https://wiki.postgresql.org/wiki/Don%27t_Do_This

2023-10-23 Thread Christophe Pettus
> On Oct 23, 2023, at 04:45, Achilleas Mantzios - cloud > wrote: > I believe this text is false on too many accounts. So, what's the consensus > about Inheritance in PostgreSQL, I am going to give a talk on it in November > and I wouldn't like to advertise/promote/teach something that the co

Re: PostgreSQL inheritance vs https://wiki.postgresql.org/wiki/Don%27t_Do_This

2023-10-23 Thread Tom Lane
Achilleas Mantzios - cloud writes: > someone added this section about inheritance : > Don't use table inheritance That's one person's opinion. (Well, they're not alone in it, but it's just an opinion not a considered community position.) > I believe this text is false on too many accounts.

Re: Presentation tools used ?

2023-10-23 Thread Bruce Momjian
On Sun, Oct 22, 2023 at 08:50:10AM +0300, Achilleas Mantzios wrote: > Hello All > > I am going to give a talk about PostgerSQL, so I'd like to ask you people > what do you use for your presentations, also I have no idea how the remote > control works to navigate through slides. I have seen it, but

Very newbie question

2023-10-23 Thread Олег Самойлов
Back pardon, but I have a very newbie question. I have a partitioned table, partitioned by primary bigint key, size of partition 1000. I need to get the number of partition which need to archive, which has all rows are olden then 3 month. Here is query: SELECT id/1000 as partition FR

Re: Very newbie question

2023-10-23 Thread Toomas
There is no reason to use index. The query has neither WHERE nor ORDER BY clause. Toomas > On 23. Oct 2023, at 18:13, Олег Самойлов wrote: > > Back pardon, but I have a very newbie question. I have a partitioned table, > partitioned by primary bigint key, size of partition 1000. I need

Re: Very newbie question

2023-10-23 Thread Francisco Olarte
On Mon, 23 Oct 2023 at 17:14, Олег Самойлов wrote: > Back pardon, but I have a very newbie question. I have a partitioned table, > partitioned by primary bigint key, size of partition 1000. I need to get > the number of partition which need to archive, which has all rows are olden > then 3

Re: Presentation tools used ?

2023-10-23 Thread Tom Browder
On Mon, Oct 23, 2023 at 09:46 Bruce Momjian wrote: You might want to watch this video I created, and maybe the bonus one too: > > https://momjian.us/main/presentations/general.html#presenting Excellent! Thanks. -Tom > >

Re: Very newbie question

2023-10-23 Thread Олег Самойлов
Well, get list of partitions and later scan one by one all 100 partitions is too simple. :) I am interesting is here more elegant way? Any rewriting the query, any creating an index are permitted. > 23 окт. 2023 г., в 18:25, Francisco Olarte > написал(а): > > On Mon, 23 Oct 2023 at 17:14, Оле

Re: Very newbie question

2023-10-23 Thread Олег Самойлов
This is not correct. An index can accelerate, for instance, max(). Here is also not WHERE or ORDER BY, but index is useful: select max(created_at) from delivery; > 23 окт. 2023 г., в 18:23, Toomas написал(а): > > > There is no reason to use index. The query has neither WHERE nor ORDER BY > cl

Re: Very newbie question

2023-10-23 Thread Ron
On 10/23/23 10:13, Олег Самойлов wrote: Back pardon, but I have a very newbie question. I have a partitioned table, partitioned by primary bigint key, size of partition 1000. I need to get the number of partition which need to archive, which has all rows are olden then 3 month. Here is que

Re: PostgreSQL inheritance vs https://wiki.postgresql.org/wiki/Don%27t_Do_This

2023-10-23 Thread Achilleas Mantzios
Στις 23/10/23 17:35, ο/η Tom Lane έγραψε: Achilleas Mantzios - cloud writes: someone added this section about inheritance : Don't use table inheritance That's one person's opinion. (Well, they're not alone in it, but it's just an opinion not a considered community position.) I believe

Re: PostgreSQL inheritance vs https://wiki.postgresql.org/wiki/Don%27t_Do_This

2023-10-23 Thread Achilleas Mantzios
Στις 23/10/23 17:01, ο/η Alvaro Herrera έγραψε: On 2023-Oct-23, Achilleas Mantzios - cloud wrote: I believe this text is false on too many accounts. So, what's the consensus about Inheritance in PostgreSQL, I am going to give a talk on it in November and I wouldn't like to advertise/promote/tea

Re: PostgreSQL inheritance vs https://wiki.postgresql.org/wiki/Don%27t_Do_This

2023-10-23 Thread Alvaro Herrera
On 2023-Oct-23, Achilleas Mantzios wrote: > I find PostgreSQL inheritance a great feature. The caveats are the same > since a long time, nothing changed in that regard, but as you say, the > implementation/limitations exist in native table partitioning as well. For partitioning, many of the limit

Passing enum Parameters to User-defined C-Language Functions

2023-10-23 Thread Albrecht Dreß
Hi, I have a (I hope not too dumb) question regarding the use of enum parameters in a user-defined function written in C, e.g. for the example given in [1]: CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy'); - How would a “mood” parameter be encoded when it is passed to the function? “Four byt

Re: PostgreSQL inheritance vs https://wiki.postgresql.org/wiki/Don%27t_Do_This

2023-10-23 Thread Achilleas Mantzios
Στις 23/10/23 17:07, ο/η Christophe Pettus έγραψε: On Oct 23, 2023, at 04:45, Achilleas Mantzios - cloud wrote: I believe this text is false on too many accounts. So, what's the consensus about Inheritance in PostgreSQL, I am going to give a talk on it in November and I wouldn't like to adv

Re: PostgreSQL inheritance vs https://wiki.postgresql.org/wiki/Don%27t_Do_This

2023-10-23 Thread Achilleas Mantzios
Στις 23/10/23 19:54, ο/η Alvaro Herrera έγραψε: On 2023-Oct-23, Achilleas Mantzios wrote: I find PostgreSQL inheritance a great feature. The caveats are the same since a long time, nothing changed in that regard, but as you say, the implementation/limitations exist in native table partitioning

Re: PostgreSQL inheritance vs https://wiki.postgresql.org/wiki/Don%27t_Do_This

2023-10-23 Thread Adrian Klaver
On 10/23/23 09:51, Achilleas Mantzios wrote: Στις 23/10/23 17:01, ο/η Alvaro Herrera έγραψε: On 2023-Oct-23, Achilleas Mantzios - cloud wrote: I believe this text is false on too many accounts. So, what's the consensus about Inheritance in PostgreSQL, I am going to give a talk on it in Novemb

Re: PostgreSQL inheritance vs https://wiki.postgresql.org/wiki/Don%27t_Do_This

2023-10-23 Thread Laurenz Albe
On Mon, 2023-10-23 at 19:49 +0300, Achilleas Mantzios wrote: > Tom Lane wrote: > > But there are valid use-cases where you > > actually do want more columns in the child tables than the parent. > > also data departmentalization, consolidation, multi-tenancy are fine use > cases (same # and types

Re: Passing enum Parameters to User-defined C-Language Functions

2023-10-23 Thread Tom Lane
Albrecht =?iso-8859-1?b?RHJl3w==?= writes: > - How would a “mood” parameter be encoded when it is passed to the function? It's an OID, which you'd have to look up in the pg_enum catalog if you want to know the string representation. regards, tom lane

Re: PostgreSQL inheritance vs https://wiki.postgresql.org/wiki/Don%27t_Do_This

2023-10-23 Thread Achilleas Mantzios
Στις 23/10/23 20:06, ο/η Laurenz Albe έγραψε: On Mon, 2023-10-23 at 19:49 +0300, Achilleas Mantzios wrote: Tom Lane wrote:  But there are valid use-cases where you actually do want more columns in the child tables than the parent. also data departmentalization, consolidation, multi-tenancy ar

Re: PostgreSQL inheritance vs https://wiki.postgresql.org/wiki/Don%27t_Do_This

2023-10-23 Thread Achilleas Mantzios
Στις 23/10/23 19:58, ο/η Achilleas Mantzios έγραψε: Στις 23/10/23 19:54, ο/η Alvaro Herrera έγραψε: On 2023-Oct-23, Achilleas Mantzios wrote: I find PostgreSQL inheritance a great feature. The caveats are the same since a long time, nothing changed in that regard, but as you say, the implement

Re: Very newbie question

2023-10-23 Thread Francisco Olarte
On Mon, 23 Oct 2023 at 17:42, Олег Самойлов wrote: > Well, get list of partitions and later scan one by one all 100 partitions is > too simple. :) I am interesting is here more elegant way? Any rewriting the > query, any creating an index are permitted. 1.- You do not scan all partitions. Had y

psql \r and \e -- what does clearing the query buffer actually do?

2023-10-23 Thread Merlin Moncure
Hello all, Couple things -- after unintentionally running a query for the (what feels like-) millionth time, it suggested a review of psql query editing behaviors. Starting with, \r (clear 'query buffer'): Other than dutifully reporting that the query buffer has been cleared, I cannot for the li

Re: psql \r and \e -- what does clearing the query buffer actually do?

2023-10-23 Thread Tom Lane
Merlin Moncure writes: > \r (clear 'query buffer'): Other than dutifully reporting that the query > buffer has been cleared, I cannot for the life of me detect any observable > behavior. Uh ... surely there's a lot. For example: regression=# foo regression-# bar; ERROR: syntax error at or nea

Disk wait problem...

2023-10-23 Thread pf
Hi, I have a 1.6TB database with over 330 tables on a 4TB NVMe SSD. All tables are static (no updates); most in 8M and 33M row sizes. Queries have been great, until recently. I use SQL-workbench/J (WB) and starting at any table, if I use up/down arrow to switch to another table, all that happens

Re: Disk wait problem...

2023-10-23 Thread Adrian Klaver
On 10/23/23 11:54, p...@pfortin.com wrote: Hi, I have a 1.6TB database with over 330 tables on a 4TB NVMe SSD. All tables are static (no updates); most in 8M and 33M row sizes. Queries have been great, until recently. Also attached is the relevant system journal entries for one query that too

Re: Disk wait problem...

2023-10-23 Thread Ken Marshall
> Hi, > > I have a 1.6TB database with over 330 tables on a 4TB NVMe SSD. All > tables are static (no updates); most in 8M and 33M row sizes. Queries have > been great, until recently. > Also attached is the relevant system journal entries for one query that > took 2 seconds and two more that too

Re: Disk wait problem...

2023-10-23 Thread pf
On Mon, 23 Oct 2023 15:09:16 -0500 Ken Marshall wrote: >> Hi, >> >> I have a 1.6TB database with over 330 tables on a 4TB NVMe SSD. All >> tables are static (no updates); most in 8M and 33M row sizes. Queries have >> been great, until recently. > >> Also attached is the relevant system journal

partitioning

2023-10-23 Thread Torsten Förtsch
Hi, I have an old, several TB table. That table has a child table (table inheritance) which is much smaller. Each row represents a certain process. The original idea was while the process is in progress it is stored in the small table. Once it has reached its final state, it is moved to the big on

Re: Disk wait problem... 15.4

2023-10-23 Thread pf
Forgot to mention version: PostgreSQL 15.4 on x86_64-mageia-linux-gnu, compiled by gcc (Mageia 12.3.0-3.mga9) 12.3.0, 64-bit Sorry, Pierre

setting up streaming replication

2023-10-23 Thread Brad White
I'm stumped. Using this command to set up the slave and replication on PG v 15: "C:\Program Files\PostgreSQL\15\bin\pg_basebackup" -h 192.168.1.126 -U pgrep_user -p 5433 -D "C:\Program Files\PostgreSQL\15\data" -Fp -Xs -R If I have PG running on the remote server and the data directory is intact,

Re: Disk wait problem...

2023-10-23 Thread Adrian Klaver
On 10/23/23 14:55, p...@pfortin.com wrote: Please reply to list also. Ccing the list for this post. On Mon, 23 Oct 2023 12:44:56 -0700 Adrian Klaver wrote: On 10/23/23 11:54, p...@pfortin.com wrote: Hi, I have a 1.6TB database with over 330 tables on a 4TB NVMe SSD. All tables are static (no

Re: Disk wait problem...

2023-10-23 Thread pf
On Mon, 23 Oct 2023 16:31:30 -0700 Adrian Klaver wrote: >Please reply to list also. >Ccing the list for this post. Sorry, got the list's message and one directly from you; looks like I picked the wrong one to reply to... I just heard from a remote team member who wrote this: !! Eventually fo

Re: setting up streaming replication

2023-10-23 Thread Ron
On 10/23/23 18:16, Brad White wrote: I'm stumped. Using this command to set up the slave and replication on PG v 15: "C:\Program Files\PostgreSQL\15\bin\pg_basebackup" -h 192.168.1.126 -U pgrep_user -p 5433 -D "C:\Program Files\PostgreSQL\15\data" -Fp -Xs -R If I have PG running on the remote

Re: partitioning

2023-10-23 Thread David Rowley
On Tue, 24 Oct 2023 at 10:39, Torsten Förtsch wrote: > Then I added this constraint to the small table: > > ALTER TABLE original_small_table > ADD CONSTRAINT partition_boundaries > CHECK((false, '-infinity')<=(is_sold, purchase_time) > AND (is_sold, purchase_time)<(false, 'infinity')) > NOT VA

Re: psql \r and \e -- what does clearing the query buffer actually do?

2023-10-23 Thread Merlin Moncure
On Mon, Oct 23, 2023 at 1:50 PM Tom Lane wrote: > Merlin Moncure writes: > > \r (clear 'query buffer'): Other than dutifully reporting that the query > > buffer has been cleared, I cannot for the life of me detect any > observable > > behavior. > > Uh ... surely there's a lot. For example: > >