Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid page in block 22 of relation base/12971/2674 #20

Open
s-p-sathish opened this issue Dec 5, 2024 · 0 comments
Open

invalid page in block 22 of relation base/12971/2674 #20

s-p-sathish opened this issue Dec 5, 2024 · 0 comments

Comments

@s-p-sathish
Copy link

While running any cerate db queries I am getting the above error

sample code for reproduce the issue

const { Client } = require('pg');
const { PostgresMock } = require('pgmock');
const client = new Client({
user: "postgres",
host: "localhost",
database: "postgres",
password: "pgmock",
port: "5432",
});
async function connectToDatabase() {
try {
const mock = await PostgresMock.create();
const connectionString = await mock.listen(5432);
console.log("connectionString" + connectionString);
await client.connect();
console.debug("Connected to the postgres database named: " + "postgres");
await client.query(CREATE TABLE Persons ( PersonID int, LastName varchar(255), FirstName varchar(255), Address varchar(255), City varchar(255) ));
console.log("Table created successfully");
} catch (err) {
console.error("Failed to connect to the database", err);
throw err;
}}
connectToDatabase();

@s-p-sathish s-p-sathish changed the title Failed to connect to the database error: invalid page in block 22 of relation base/12971/2674 invalid page in block 22 of relation base/12971/2674 Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant