pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
WARNING:  could not flush dirty data: Function not implemented
15+ messages / 8 participants
[nested] [flat]

* WARNING:  could not flush dirty data: Function not implemented
@ 2018-09-02 22:57  Ravi Krishna <sravikrishna@aol.com>
  0 siblings, 2 replies; 15+ messages in thread

From: Ravi Krishna @ 2018-09-02 22:57 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

Ubuntu 18.04 as Windows bash

Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:        18.04
Codename:       bionic


PG 10.5.1

postgres@ravi-lenovo:~$ psql -d postgres
psql (10.5 (Ubuntu 10.5-1.pgdg16.04+1))

A CREATE DATABASE statement spewed out 

WARNING:  could not flush dirty data: Function not implemented

many times, but the db was created.

What exactly is this?

A simple search tells that this is an old problem and my Windows has necessary WSL and other subsystem for this error to not show up.






^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: WARNING: could not flush dirty data: Function not implemented
@ 2018-09-02 23:29  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Ravi Krishna <sravikrishna@aol.com>
  1 sibling, 2 replies; 15+ messages in thread

From: Tom Lane @ 2018-09-02 23:29 UTC (permalink / raw)
  To: Ravi Krishna <sravikrishna@aol.com>; +Cc: pgsql-general@lists.postgresql.org

Ravi Krishna <sravikrishna@aol.com> writes:
> A CREATE DATABASE statement spewed out 
> WARNING:  could not flush dirty data: Function not implemented

Hmm, that's probably ENOSYS coming back from sync_file_range().
What filesystem is this database sitting on?

It's harmless from a correctness standpoint, because we'll fsync
the data later anyway; but it seems bad that we've selected
sync_file_range() if it doesn't actually work on your platform.

> A simple search tells that this is an old problem and my Windows has necessary WSL and other subsystem for this error to not show up.

If this is on Ubuntu, I don't understand why you're talking
about Windows.

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: WARNING:  could not flush dirty data: Function not implemented
@ 2018-09-02 23:31  Andres Freund <andres@anarazel.de>
  parent: Ravi Krishna <sravikrishna@aol.com>
  1 sibling, 1 reply; 15+ messages in thread

From: Andres Freund @ 2018-09-02 23:31 UTC (permalink / raw)
  To: Ravi Krishna <sravikrishna@aol.com>; +Cc: pgsql-general@lists.postgresql.org

Hi,

On 2018-09-02 22:57:55 +0000, Ravi Krishna wrote:
> Ubuntu 18.04 as Windows bash
> 
> Distributor ID: Ubuntu
> Description:    Ubuntu 18.04.1 LTS
> Release:        18.04
> Codename:       bionic
> 
> 
> PG 10.5.1
> 
> postgres@ravi-lenovo:~$ psql -d postgres
> psql (10.5 (Ubuntu 10.5-1.pgdg16.04+1))
> 
> A CREATE DATABASE statement spewed out 
> 
> WARNING:  could not flush dirty data: Function not implemented
> 
> many times, but the db was created.
> 
> What exactly is this?

That means that the linux emulation by microsoft isn't good enough.  You
can work around it by setting checkpoint_flush_after=0 and
wal_writer_flush_after=0.


> A simple search tells that this is an old problem and my Windows has
> necessary WSL and other subsystem for this error to not show up.

Please note that nobody has verified that postgres works correctly via
the emulation stuff MS is doing.  There is a native version of postgres
for windows however, and that is tested (and exercised by a lot of
installations).


Greetings,

Andres Freund




^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: WARNING: could not flush dirty data: Function not implemented
@ 2018-09-03 02:05  Ravi Krishna <sravikrishna@aol.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 15+ messages in thread

From: Ravi Krishna @ 2018-09-03 02:05 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-general@lists.postgresql.org

> 
> If this is on Ubuntu, I don't understand why you're talking
> about Windows.

Because I am using Ubuntu Bash on Windows, which requires WLS (Windows Linux Subsystem).  I also have necessary build version of Windows which supports Ubuntu Bash.



^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: WARNING: could not flush dirty data: Function not implemented
@ 2018-09-03 03:04  Andres Freund <andres@anarazel.de>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 15+ messages in thread

From: Andres Freund @ 2018-09-03 03:04 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Ravi Krishna <sravikrishna@aol.com>; pgsql-general@lists.postgresql.org

Hi,

On 2018-09-02 19:29:49 -0400, Tom Lane wrote:
> Ravi Krishna <sravikrishna@aol.com> writes:
> > A simple search tells that this is an old problem and my Windows has necessary WSL and other subsystem for this error to not show up.
> 
> If this is on Ubuntu, I don't understand why you're talking
> about Windows.

The OP said "Ubuntu 18.04 as Windows bash" - so I assume this is
postgres compiled as a linux binary is running on MS's new-ish linux
emulation.

Greetings,

Andres Freund




^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: WARNING:  could not flush dirty data: Function not implemented
@ 2018-09-03 11:59  Ravi Krishna <sravikrishna@aol.com>
  0 siblings, 0 replies; 15+ messages in thread

From: Ravi Krishna @ 2018-09-03 11:59 UTC (permalink / raw)
  To: ; +Cc: pgsql-general@lists.postgresql.org

>That means that the linux emulation by microsoft isn't good enough.  You
>can work around it by setting checkpoint_flush_after=0 and
>wal_writer_flush_after=0.


bgwriter_flush_after = 0                # measured in pages, 0 disables
backend_flush_after = 0                # measured in pages, 0 disables
wal_writer_flush_after = 0              # measured in pages, 0 disables
checkpoint_flush_after = 0              # measured in pages, 0 disables

I set it as shown above and yet while create the database I get the same warning.




^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: WARNING: could not flush dirty data: Function not implemented
@ 2018-09-03 13:33  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Andres Freund <andres@anarazel.de>
  0 siblings, 2 replies; 15+ messages in thread

From: Tom Lane @ 2018-09-03 13:33 UTC (permalink / raw)
  To: Andres Freund <andres@anarazel.de>; +Cc: Ravi Krishna <sravikrishna@aol.com>; pgsql-general@lists.postgresql.org

Andres Freund <andres@anarazel.de> writes:
> On 2018-09-02 19:29:49 -0400, Tom Lane wrote:
>> If this is on Ubuntu, I don't understand why you're talking
>> about Windows.

> The OP said "Ubuntu 18.04 as Windows bash" - so I assume this is
> postgres compiled as a linux binary is running on MS's new-ish linux
> emulation.

Whee ... so you get to cope with all the bugs/idiosyncrasies of three
operating system layers, not just one.  I concur that running Postgres
in the underlying Windows O/S is probably a much better idea.

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: WARNING: could not flush dirty data: Function not implemented
@ 2018-09-03 13:42  Ravi Krishna <sravikrishna@aol.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 15+ messages in thread

From: Ravi Krishna @ 2018-09-03 13:42 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Andres Freund <andres@anarazel.de>; pgsql-general@lists.postgresql.org

> 
> Whee ... so you get to cope with all the bugs/idiosyncrasies of three
> operating system layers, not just one.  I concur that running Postgres
> in the underlying Windows O/S is probably a much better idea.

Me too, but this is purely for learning and I am much more use to Linux stack then ... gasp Windows :-)

Anyhow so far I am seeing this warning only for create database command.  So I can ignore.



^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: WARNING: could not flush dirty data: Function not implemented
@ 2018-09-03 13:58  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Ravi Krishna <sravikrishna@aol.com>
  0 siblings, 2 replies; 15+ messages in thread

From: Tom Lane @ 2018-09-03 13:58 UTC (permalink / raw)
  To: Ravi Krishna <sravikrishna@aol.com>; +Cc: Andres Freund <andres@anarazel.de>; pgsql-general@lists.postgresql.org

Ravi Krishna <sravikrishna@aol.com> writes:
>> Whee ... so you get to cope with all the bugs/idiosyncrasies of three
>> operating system layers, not just one.  I concur that running Postgres
>> in the underlying Windows O/S is probably a much better idea.

> Me too, but this is purely for learning and I am much more use to Linux stack then ... gasp Windows :-)

Hmm, so maybe you should install Ubuntu as the native O/S, and when
you need Windows, run it inside a VM?

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: WARNING: could not flush dirty data: Function not implemented
@ 2018-09-03 17:32  Dmitri Maziuk <dmaziuk@bmrb.wisc.edu>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 15+ messages in thread

From: Dmitri Maziuk @ 2018-09-03 17:32 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On Mon, 03 Sep 2018 09:58:57 -0400
Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Ravi Krishna <sravikrishna@aol.com> writes:
> >> Whee ... so you get to cope with all the bugs/idiosyncrasies of three
> >> operating system layers, not just one.  I concur that running Postgres
> >> in the underlying Windows O/S is probably a much better idea.
> 
> > Me too, but this is purely for learning and I am much more use to Linux stack then ... gasp Windows :-)
> 
> Hmm, so maybe you should install Ubuntu as the native O/S, and when
> you need Windows, run it inside a VM?
 
Between windows 10 and ubuntu 18.04, I would take a really close look at freebsd myself. Or at least alpine...

-- 
Dmitri Maziuk <dmaziuk@bmrb.wisc.edu>




^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: WARNING: could not flush dirty data: Function not implemented
@ 2018-09-03 18:41  Austin Drenski <austindrenski@gmail.com>
  parent: Dmitri Maziuk <dmaziuk@bmrb.wisc.edu>
  0 siblings, 1 reply; 15+ messages in thread

From: Austin Drenski @ 2018-09-03 18:41 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

Dmitri Maziuk <dmaziuk@bmrb.wisc.edu> wrote:
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Ravi Krishna <sravikrishna@aol.com> writes:
>>>> Whee ... so you get to cope with all the bugs/idiosyncrasies of three
>>>> operating system layers, not just one.  I concur that running Postgres
>>>> in the underlying Windows O/S is probably a much better idea.
>>
>>> Me too, but this is purely for learning and I am much more use to Linux
stack then ... gasp Windows :-)
>>
>> Hmm, so maybe you should install Ubuntu as the native O/S, and when
>> you need Windows, run it inside a VM?
>
> Between windows 10 and ubuntu 18.04, I would take a really close look at
freebsd myself. Or at least alpine...

As a developer, I regularly work with PostgreSQL in the Windows Subsystem
for Linux (WSL). In using it for sandboxing and testing, the only notable
idiosyncrasy that I have encountered is the appearance of these warnings on
startup.

Unfortunately, workstation OS is not always a choice, but WSL has so far
offered a productive (and built-in!) option for running Linux-based tools
on Windows.

I can't imagine running a production server from WSL, but it is a
refreshingly simple way to spin up local dev databases. It would be great
to see the community take an interest in supporting PostgreSQL in WSL, if
only in the context of its use as a development tool.

--
Austin Drenski

^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: WARNING: could not flush dirty data: Function not implemented
@ 2018-09-03 19:19  Rob Sargent <robjsargent@gmail.com>
  parent: Austin Drenski <austindrenski@gmail.com>
  0 siblings, 0 replies; 15+ messages in thread

From: Rob Sargent @ 2018-09-03 19:19 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org



On 09/03/2018 12:41 PM, Austin Drenski wrote:
> Dmitri Maziuk <dmaziuk@bmrb.wisc.edu <mailto:dmaziuk@bmrb.wisc.edu>> 
> wrote:
> > Tom Lane <tgl@sss.pgh.pa.us <mailto:tgl@sss.pgh.pa.us>> wrote:
> >> Ravi Krishna <sravikrishna@aol.com <mailto:sravikrishna@aol.com>> writes:
> >>>> Whee ... so you get to cope with all the bugs/idiosyncrasies of three
> >>>> operating system layers, not just one.  I concur that running Postgres
> >>>> in the underlying Windows O/S is probably a much better idea.
> >>
> >>> Me too, but this is purely for learning and I am much more use to 
> Linux stack then ... gasp Windows :-)
> >>
> >> Hmm, so maybe you should install Ubuntu as the native O/S, and when
> >> you need Windows, run it inside a VM?
> >
> > Between windows 10 and ubuntu 18.04, I would take a really close look at 
> freebsd myself. Or at least alpine...
>
> As a developer, I regularly work with PostgreSQL in the Windows 
> Subsystem for Linux (WSL). In using it for sandboxing and testing, the 
> only notable idiosyncrasy that I have encountered is the appearance of 
> these warnings on startup.
>
> Unfortunately, workstation OS is not always a choice, but WSL has so 
> far offered a productive (and built-in!) option for running 
> Linux-based tools on Windows.
>
> I can't imagine running a production server from WSL, but it is a 
> refreshingly simple way to spin up local dev databases. It would be 
> great to see the community take an interest in supporting PostgreSQL 
> in WSL, if only in the context of its use as a development tool.
>
> --
> Austin Drenski
I lost here.   If you're forced to run windows as the principle OS run 
windows-based postgres.  If you wish to use the ubuntu as a dev 
environment can you not connect from there to the native Postgres instance.

^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: WARNING: could not flush dirty data: Function not implemented
@ 2018-09-03 22:01  Tim Cross <theophilusx@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 15+ messages in thread

From: Tim Cross @ 2018-09-03 22:01 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Andres Freund <andres@anarazel.de>; Ravi Krishna <sravikrishna@aol.com>; pgsql-general@lists.postgresql.org


Tom Lane <tgl@sss.pgh.pa.us> writes:

> Andres Freund <andres@anarazel.de> writes:
>> On 2018-09-02 19:29:49 -0400, Tom Lane wrote:
>>> If this is on Ubuntu, I don't understand why you're talking
>>> about Windows.
>
>> The OP said "Ubuntu 18.04 as Windows bash" - so I assume this is
>> postgres compiled as a linux binary is running on MS's new-ish linux
>> emulation.
>
> Whee ... so you get to cope with all the bugs/idiosyncrasies of three
> operating system layers, not just one.

That comment has made my day - thanks Tom!


-- 
Tim Cross




^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: WARNING: could not flush dirty data: Function not implemented
@ 2018-09-03 22:09  Tim Cross <theophilusx@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 15+ messages in thread

From: Tim Cross @ 2018-09-03 22:09 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Ravi Krishna <sravikrishna@aol.com>; Andres Freund <andres@anarazel.de>; pgsql-general@lists.postgresql.org


Tom Lane <tgl@sss.pgh.pa.us> writes:

> Ravi Krishna <sravikrishna@aol.com> writes:
>>> Whee ... so you get to cope with all the bugs/idiosyncrasies of three
>>> operating system layers, not just one.  I concur that running Postgres
>>> in the underlying Windows O/S is probably a much better idea.
>
>> Me too, but this is purely for learning and I am much more use to Linux stack then ... gasp Windows :-)
>
> Hmm, so maybe you should install Ubuntu as the native O/S, and when
> you need Windows, run it inside a VM?
>
> 			regards, tom lane

This is what I do and it works well except.....

If you don't run the windows VM very often (like me), when you do, start
it before lunch or that next long meeting. The updates will grind things
to a crawl. When you run every day or fairly frequently, you don't
notice them, but if you only run once every 4+ weeks, it can have a big
impact and take ages.

Linux as the host and using the VM is still better than the weird
idiosyncrasies of Windows as the main workstation client (IMO). Where
office policy has insisted on Windows as the workstation, I have had
reasonable success with running virtualbox with Linux, though these
days, the Windows environment is often too locked down to allow
this. I've not yet experimented with the virtual linux layer in w10. 

-- 
Tim Cross




^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: WARNING:  could not flush dirty data: Function not implemented
@ 2018-09-04 01:08  Michael Paquier <michael@paquier.xyz>
  parent: Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 15+ messages in thread

From: Michael Paquier @ 2018-09-04 01:08 UTC (permalink / raw)
  To: Andres Freund <andres@anarazel.de>; +Cc: Ravi Krishna <sravikrishna@aol.com>; pgsql-general@lists.postgresql.org

On Sun, Sep 02, 2018 at 04:31:18PM -0700, Andres Freund wrote:
> Please note that nobody has verified that postgres works correctly via
> the emulation stuff MS is doing.  There is a native version of postgres
> for windows however, and that is tested (and exercised by a lot of
> installations).

If there are folks willing to put enough effort in getting this to work,
it could work, assuming that a buildfarm animal is able to get down this
road.  From what I can see on this thread we are not yet at that stage
though.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 15+ messages in thread


end of thread, other threads:[~2018-09-04 01:08 UTC | newest]

Thread overview: 15+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-09-02 22:57 WARNING:  could not flush dirty data: Function not implemented Ravi Krishna <sravikrishna@aol.com>
2018-09-02 23:29 ` Re: WARNING: could not flush dirty data: Function not implemented Tom Lane <tgl@sss.pgh.pa.us>
2018-09-03 02:05   ` Re: WARNING: could not flush dirty data: Function not implemented Ravi Krishna <sravikrishna@aol.com>
2018-09-03 03:04   ` Re: WARNING: could not flush dirty data: Function not implemented Andres Freund <andres@anarazel.de>
2018-09-03 13:33     ` Re: WARNING: could not flush dirty data: Function not implemented Tom Lane <tgl@sss.pgh.pa.us>
2018-09-03 13:42       ` Re: WARNING: could not flush dirty data: Function not implemented Ravi Krishna <sravikrishna@aol.com>
2018-09-03 13:58         ` Re: WARNING: could not flush dirty data: Function not implemented Tom Lane <tgl@sss.pgh.pa.us>
2018-09-03 17:32           ` Re: WARNING: could not flush dirty data: Function not implemented Dmitri Maziuk <dmaziuk@bmrb.wisc.edu>
2018-09-03 18:41             ` Re: WARNING: could not flush dirty data: Function not implemented Austin Drenski <austindrenski@gmail.com>
2018-09-03 19:19               ` Re: WARNING: could not flush dirty data: Function not implemented Rob Sargent <robjsargent@gmail.com>
2018-09-03 22:09           ` Re: WARNING: could not flush dirty data: Function not implemented Tim Cross <theophilusx@gmail.com>
2018-09-03 22:01       ` Re: WARNING: could not flush dirty data: Function not implemented Tim Cross <theophilusx@gmail.com>
2018-09-02 23:31 ` Andres Freund <andres@anarazel.de>
2018-09-04 01:08   ` Michael Paquier <michael@paquier.xyz>
2018-09-03 11:59 Re: WARNING:  could not flush dirty data: Function not implemented Ravi Krishna <sravikrishna@aol.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox