Re: Tablespace OID, database OID, relfilenode

2023-01-17 Thread Adrian Klaver
On 1/17/23 11:49, Wiwwo Staff wrote: Thank you Adrian, thank you David! So, it turns out, it *is* indeed an arbitrary constant... I have been answered many times RTFM, it is actually the first time I have being answered RTF source code. (I searched for 1663 in PG docs, it is there, although not

Re: Maintaining blank lines in psql output?

2023-01-17 Thread Ron
On 1/17/23 15:22, David G. Johnston wrote: On Tue, Jan 17, 2023 at 1:48 PM Ron wrote: White space can of course make things easy to read, but psql seems to ignore those blank lines.  Is there any way to retain them in psql output? Nope, there is no setting for psql to print all

Re: Maintaining blank lines in psql output?

2023-01-17 Thread raf
On Tue, Jan 17, 2023 at 04:10:50PM -0700, "David G. Johnston" wrote: > On Tue, Jan 17, 2023 at 4:07 PM raf wrote: > > > On Tue, Jan 17, 2023 at 02:22:22PM -0700, "David G. Johnston" < > > david.g.johns...@gmail.com> wrote: > > > > > On Tue, Jan 17, 2023 at 1:48 PM Ron wrote: > > > > > > > >

Re: Maintaining blank lines in psql output?

2023-01-17 Thread David G. Johnston
On Tue, Jan 17, 2023 at 4:07 PM raf wrote: > On Tue, Jan 17, 2023 at 02:22:22PM -0700, "David G. Johnston" < > david.g.johns...@gmail.com> wrote: > > > On Tue, Jan 17, 2023 at 1:48 PM Ron wrote: > > > > > > > > White space can of course make things easy to read, but psql seems to > > > ignore >

Re: Maintaining blank lines in psql output?

2023-01-17 Thread raf
On Tue, Jan 17, 2023 at 02:22:22PM -0700, "David G. Johnston" wrote: > On Tue, Jan 17, 2023 at 1:48 PM Ron wrote: > > > > > White space can of course make things easy to read, but psql seems to > > ignore > > those blank lines. Is there any way to retain them in psql output? > > > > > Nope,

Re: pg_upgrade 13.6 to 15.1?

2023-01-17 Thread Bruce Momjian
On Sun, Jan 15, 2023 at 04:27:50PM -0500, p...@pfortin.com wrote: > >3) Again, read the docs multiple times there is a lot to understand. > > Agreed. But they could be a little clearer... :) Agreed the docs are complex, but how can they be clearer? -- Bruce Momjian

Re: Are ZFS snapshots unsafe when PGSQL is spreading through multiple zpools?

2023-01-17 Thread Bruce Momjian
On Tue, Jan 17, 2023 at 03:22:02PM +, HECTOR INGERTO wrote: > > Another case: a transaction COMMITs, and a slightly later transaction reads > the data > > and sets a hint bit. If the snapshot of the file system with the data > directory in it > > is slightly later than the snapshot of the

Re: Use case for enabling log_duration other than benchmarking

2023-01-17 Thread Bruce Momjian
On Tue, Jan 10, 2023 at 04:57:11PM +0100, Alicja Kucharczyk wrote: > thank you Ron. > My question is a bit more practical - Does anyone really find it useful?  > What value brings the info that 20% of my query are under 1ms and 10% over 1 > minute - If just checked once and then turned off - I can

Re: Maintaining blank lines in psql output?

2023-01-17 Thread David G. Johnston
On Tue, Jan 17, 2023 at 1:48 PM Ron wrote: > > White space can of course make things easy to read, but psql seems to > ignore > those blank lines. Is there any way to retain them in psql output? > > Nope, there is no setting for psql to print all blank lines it encounters to stdout. If you

Maintaining blank lines in psql output?

2023-01-17 Thread Ron
White space can of course make things easy to read, but psql seems to ignore those blank lines.  Is there any way to retain them in psql output? $ cat spaces.sql insert into foo values(1); insert into foo values(2); insert into foo values(3); insert into foo values(4); insert into bar

Re: Tablespace OID, database OID, relfilenode

2023-01-17 Thread Wiwwo Staff
Thank you Adrian, thank you David! So, it turns out, it *is* indeed an arbitrary constant... I have been answered many times RTFM, it is actually the first time I have being answered RTF source code. (I searched for 1663 in PG docs, it is there, although not really "intuitive"). Allow me to

Re: https://wiki.postgresql.org/wiki/Working_with_Git link one link cannot open, another link is unrelated.

2023-01-17 Thread Alvaro Herrera
On 2022-Dec-29, Melih Mutlu wrote: > also in this link: https://wiki.postgresql.org/wiki/Working_with_Git > > > >> See the documentation and tutorials at http://git.or.cz/ for a more > >> detailed Git introduction. For a more detailed lesson, check out > >> http://progit.org and maybe get a

Re: Tablespace OID, database OID, relfilenode

2023-01-17 Thread Adrian Klaver
On 1/17/23 07:35, Wiwwo Staff wrote: Hi Laurenz, thanks for your answer! Ok, but I don't think "1663" is a sort of constant value for "base", isn't it? From source: backend/catalog/postgres.bki open pg_tablespace insert ( 1663 pg_default 10 _null_ _null_ ) insert ( 1664 pg_global 10 _null_

Re: Tablespace OID, database OID, relfilenode

2023-01-17 Thread David G. Johnston
On Tue, Jan 17, 2023 at 8:36 AM Wiwwo Staff wrote: > Hi Laurenz, > thanks for your answer! > Ok, but I don't think "1663" is a sort of constant value for "base", isn't > it? > > Let me clarify my question: how do I get, with a query, from "base" to > 1663 (or whatever the value is)? > >> >> The

Re: Tablespace OID, database OID, relfilenode

2023-01-17 Thread Wiwwo Staff
Hi Laurenz, thanks for your answer! Ok, but I don't think "1663" is a sort of constant value for "base", isn't it? Let me clarify my question: how do I get, with a query, from "base" to 1663 (or whatever the value is)? On Tue, Jan 17, 2023 at 4:01 PM Laurenz Albe wrote: > On Tue, 2023-01-17 at

RE: Are ZFS snapshots unsafe when PGSQL is spreading through multiple zpools?

2023-01-17 Thread HECTOR INGERTO
> Another case: a transaction COMMITs, and a slightly later transaction reads > the data > and sets a hint bit. If the snapshot of the file system with the data > directory in it > is slightly later than the snapshot of the file system with "pg_wal", the > COMMIT might > not be part of the

Re: Tablespace OID, database OID, relfilenode

2023-01-17 Thread Laurenz Albe
On Tue, 2023-01-17 at 15:48 +0100, Wiwwo Staff wrote: > Quick and to the point: > > If i execute > select pg_relation_filepath('pgbench_accounts'); > > I get >  pg_relation_filepath > -- >  base/5/16398 > > where "base" is tablespace, but not tablespace OID, nor tablespace

Tablespace OID, database OID, relfilenode

2023-01-17 Thread Wiwwo Staff
Hi! Quick and to the point: If i execute select pg_relation_filepath('pgbench_accounts'); I get pg_relation_filepath -- base/5/16398 where "base" is tablespace, but not tablespace OID, nor tablespace name. How do I link it to get from "base" the tablespace OID? Or, in

Re: Are ZFS snapshots unsafe when PGSQL is spreading through multiple zpools?

2023-01-17 Thread Laurenz Albe
On Mon, 2023-01-16 at 14:37 +, HECTOR INGERTO wrote: > > The database relies on the data being consistent when it performs crash > > recovery. > > Imagine that a checkpoint is running while you take your snapshot.  The > > checkpoint > > syncs a data file with a new row to disk.  Then it

pg_stat_all_tables: n_live_tup column value not persisting

2023-01-17 Thread pran d
Hi, I'm trying to get the row count of each table in a database, for which I'm using the postgres statistics table:pg_stat_all_tables. To determine the count Im using n_live_tup column in pg_stat_all_tables. I manually ran vacuum and analyse on the database so the latest counts get updated in

Re: Are ZFS snapshots unsafe when PGSQL is spreading through multiple zpools?

2023-01-17 Thread Magnus Hagander
On Mon, Jan 16, 2023 at 3:37 PM HECTOR INGERTO wrote: > > The database relies on the data being consistent when it performs crash > recovery. > > Imagine that a checkpoint is running while you take your snapshot. The > checkpoint > > syncs a data file with a new row to disk. Then it writes a

Re: Are ZFS snapshots unsafe when PGSQL is spreading through multiple zpools?

2023-01-17 Thread Alban Hertroys
> On 16 Jan 2023, at 15:37, HECTOR INGERTO wrote: > > > The database relies on the data being consistent when it performs crash > > recovery. > > Imagine that a checkpoint is running while you take your snapshot. The > > checkpoint > > syncs a data file with a new row to disk. Then it