Re: WAL being written during SELECT * query

From: Tom DalPozzo <t(dot)dalpozzo(at)gmail(dot)com>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: WAL being written during SELECT * query
Date: 2017-04-06 15:51:12
Message-ID: CAK77FCRBzm-TNDJpBKERHVHGNMWi_Vm7iJnAsu88pj5aaWYihg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2017-04-04 19:18 GMT+02:00 Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>:

> On Tue, Apr 4, 2017 at 9:46 AM, Tom DalPozzo <t(dot)dalpozzo(at)gmail(dot)com> wrote:
> > Hi,
> > I have a very big table (10GB).
> > I noticed that many WAL segments are being written when elaborating read
> > only transactions like this:
> > select * from dati25600000000 where id >43000000 limit 1000000;
> > I don't understand why are there WAL writings during read only
> transactions.
> > Regards
> > Pupillo
>
>
>
> I think this is the db setting hint bits, but I'm no expert in that area.
>

Hi,
I'm not able to reproduce the problem in a deterministic way. Sometimes it
does sometimes not.
Anyway, examining with pg_xlogdum those WAL, I get many many records like
these:

rmgr: XLOG len (rec/tot): 0/ 8173, tx: 0, lsn:
C/E502AF28, prev C/E5028F20, desc: FPI_FOR_HINT , blkref #0: rel
1663/16384/18846 blk 1454439 FPW
rmgr: XLOG len (rec/tot): 0/ 8173, tx: 0, lsn:
C/E502CF30, prev C/E502AF28, desc: FPI_FOR_HINT , blkref #0: rel
1663/16384/18846 blk 1454440 FPW
rmgr: XLOG len (rec/tot): 0/ 8173, tx: 0, lsn:
C/E502EF38, prev C/E502CF30, desc: FPI_FOR_HINT , blkref #0: rel
1663/16384/18846 blk 1454441 FPW
rmgr: XLOG len (rec/tot): 0/ 8173, tx: 0, lsn:
C/E5030F40, prev C/E502EF38, desc: FPI_FOR_HINT , blkref #0: rel
1663/16384/18846 blk 1454442 FPW
rmgr: XLOG len (rec/tot): 0/ 8173, tx: 0, lsn:
C/E5032F48, prev C/E5030F40, desc: FPI_FOR_HINT , blkref #0: rel
1663/16384/18846 blk 1454443 FPW

What is the meaning of FPI_FOR_HINT?

I've replication slots and async replication, but slaves are kept off (PCs
not powered).
No other queries except that one.
Even select count (*) from dati25600000000; gives the problem (sometimes)
Thanks
Pupillo

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2017-04-06 16:30:27 Re: WAL being written during SELECT * query
Previous Message David G. Johnston 2017-04-06 15:46:58 Re: Archiving data to another server using copy, psql with pipe