Re: Writing WAL files

2020-10-10 Thread Peter J. Holzer
On 2020-10-05 11:29:04 -0600, Michael Lewis wrote: > > I suggest that in PG12 you can monitor the > "lag" of a standby server more directly by looking at columns > write_lag, > flush_lag, replay_lag in the pg_stat_replication view.  > > > And are those things

Re: What's your experience with using Postgres in IoT-contexts?

2020-10-10 Thread Peter J. Holzer
On 2020-10-05 11:20:20 +0200, Thorsten Schöning wrote: > Does anyone actually use Postgres with ARM based low performance > hardware and only 256 MiB of RAM? [...] > Background: > > I have some server side backend exposing web services and storing data > in Postgres. The stored data are telegrams

Re: What's your experience with using Postgres in IoT-contexts?

2020-10-10 Thread Thorsten Schöning
Guten Tag Peter J. Holzer, am Samstag, 10. Oktober 2020 um 10:56 schrieben Sie: > Do you plan to move some of that reporting to the IoT devices? (Maybe > equip them with a display with a dashboard, or something like that) Not necessarily with a display, but something like a dashboard for a web-UI

Re: How to migrate column type from uuid to serial

2020-10-10 Thread Peter J. Holzer
On 2020-10-07 20:10:34 +0530, Hemil Ruparel wrote: > Sorry if this is silly but if it is a 128 bit number, why do we need 32 > characters to represent it? Isn't 8 bits one byte? Yes, 8 bits are 1 byte. But that's 256 different values, so to display them in 1 character you would need 256 different

Re: What's your experience with using Postgres in IoT-contexts?

2020-10-10 Thread Peter J. Holzer
On 2020-10-10 11:22:42 +0200, Thorsten Schöning wrote: > Guten Tag Peter J. Holzer, > am Samstag, 10. Oktober 2020 um 10:56 schrieben Sie: > > > Do you plan to move some of that reporting to the IoT devices? (Maybe > > equip them with a display with a dashboard, or something like that) > > Not ne

Re: How to migrate column type from uuid to serial

2020-10-10 Thread Peter J. Holzer
On 2020-10-10 11:31:23 +0200, Peter J. Holzer wrote: > On 2020-10-07 20:10:34 +0530, Hemil Ruparel wrote: > > Sorry if this is silly but if it is a 128 bit number, why do we need 32 > > characters to represent it? Isn't 8 bits one byte? > > Yes, 8 bits are 1 byte. But that's 256 different values,

Re: What's your experience with using Postgres in IoT-contexts?

2020-10-10 Thread Thorsten Schöning
Guten Tag Peter J. Holzer, am Samstag, 10. Oktober 2020 um 12:00 schrieben Sie: > Not necessarily. You would have to allocate the appropriate number of > inodes, of course. Using one file per telegram wastes some space, but > for a few thousand telegrams that may not matter[1]. Indeed, with ext4 y

Re: How to migrate column type from uuid to serial

2020-10-10 Thread Hemil Ruparel
oh. I get it now. Thanks On Sat, Oct 10, 2020 at 3:41 PM Peter J. Holzer wrote: > On 2020-10-10 11:31:23 +0200, Peter J. Holzer wrote: > > On 2020-10-07 20:10:34 +0530, Hemil Ruparel wrote: > > > Sorry if this is silly but if it is a 128 bit number, why do we need 32 > > > characters to represe

Re: Writing WAL files

2020-10-10 Thread Cory Nemelka
On Sat, Oct 10, 2020 at 3:41 AM Peter J. Holzer wrote: > On 2020-10-05 11:29:04 -0600, Michael Lewis wrote: > > > > I suggest that in PG12 you can monitor the > > "lag" of a standby server more directly by looking at columns > > write_lag, > > flush_lag, replay_lag

Strange behavior

2020-10-10 Thread Olivier Leprêtre
Hi, I’m surprised by this behavior I noticed in pgadmin3 and postgresql 9.6 Suppose those two tables create table test1 (v1 text) create table test2 (v2 text) insert into test1 (v1) values ('A') insert into test2 (v2) values ('B') query select v1 from test2 return v2 column doesn’t exi

Re: Strange behavior

2020-10-10 Thread Francisco Olarte
Olivier: On Sat, Oct 10, 2020 at 6:13 PM Olivier Leprêtre wrote: > I’m surprised by this behavior I noticed in pgadmin3 and postgresql 9.6 ... > select v1 from test1 where v1 not in (select v1 from test2) This is called a correlated subquery ( google and search for it, it is even in wikipedia

Re: Strange behavior

2020-10-10 Thread David G. Johnston
On Sat, Oct 10, 2020 at 9:13 AM Olivier Leprêtre wrote: This has nothing to do with pgAdmin, or any other client interface. In other words, a wrong query returns a valid result. This happens because > v1 is a column from test1, (select vx from test2) will return an error as > expected. > https:

Re: Strange behavior

2020-10-10 Thread Tom Lane
"David G. Johnston" writes: > I am pondering trying to get the FAQ entry incorporated into the actual > documentation. Not sure how much it'd help, but we have warnings against mistakes that are far less common than this one, so sure why not. Taking a quick gander at the docs, it seems like the

Re: Gurjeet Singh Index Adviser User Interface

2020-10-10 Thread Jony Cohen
Hi Yessica, Postgres 8.3 is very old, If you are using that simply because of the index advisor there are a few more “modern” options. I at the time wrote such a tool for Postgres 9.4 (it has many features that the one by Gurjeet didn’t have like CTE and partial indexes support) Alas I didn’t ha